Skip to content

Using the API

To use the Admin API an API User must first be created in the ChilliConnect Dashboard - see Admin API Getting Started. Once a user is created any HTTP tools such as cURL, or Postman, can be used to interact with the Admin API.

Prerequisites

All requests require Token, Secret and Version. Token and Secret are the details from the API User - ensure the configured permissions allow access to the game being requested, and Version is the version of the Admin API, which is documented in the API documentation.

Token, Secret and Version are sent as HTTP headers with each request

Api-Token: a7rq886Vcrd4X9kGC52iGwJXdOwTi1hB
Api-Secret: jEx4C9ZDgVu9trMf
Api-Version: 1.0.0

API Versions

Version is required, it describes the definition of the request and response that is expected. ChilliConnect may add, alter and remove fields and functionality in future releases but no breaking changes will be made without a version identifier update. Existing versions will continue to be supported until notified otherwise.

Making a Call

Using cURL to return a game's available Catalog Versions

Command

curl -X GET \
  https://adminapi.chilliconnect.com/game/{game-token}/catalog/versions \
  -H 'Api-Token: {api-token}' \
  -H 'Api-Secret: {api-secret}' \
  -H 'Api-Version: 1.0.0'

Response

[
    {
        "Version": "1",
        "PackageUrl": "https://cdn.chilliconnect.com/1/1/catalog/catalog-1-gRzAUlJSFVWWBjtc17rVTqGo640TxqMu-da39a3ee5e6b4b0d3855bfef95601890afd80719.zip",
        "DatePublished": "2019-08-25T15:20:37"
    }
]

Note a Catalog Version is created each time a game's Catalog is published. If a game's Catalog has never been published an empty response will be returned.

Empty Response

[]

Making a Call with Parameters

Using cURL to create a Currency Catalog Item. Note the addition of the Content-Type header.

Command

curl -X POST \
  https://adminapi.chilliconnect.com/game/{game-token}/catalog/item \
  -H 'Api-Token: {api-token}' \
  -H 'Api-Secret: {api-secret}' \
  -H 'Api-Version: 1.0.0' \
  -H 'Content-Type: application/json' \
  -d '{
    "Type": "CURRENCY",
    "Name": "Cash Notes",
    "Key": "CASH_NOTES",
    "Tags": [
        "money"
    ],
    "CustomData": {
        "Weight": 100
    },
    "Initial": 0,
    "Max": 1000
}'

A complete list of available calls and parameters can be found in the Admin API Documentation.