Command service API

The Command service provides an HTTP API for third party applications. It provides a way to send commands to the game.

This API can send commands directly to the game, so it is important to protect this API. A security token is required in order to send requests to this service.

HTTP header

Each request needs to add the following headers.

Listing 4 Example header
GET /myrequest HTTP/1.0
secret: secretcodeprovidedbyus

POST /commands/game

Send a command to the game

{
   "key": "commandid",
   "value": "anything"
}

A command is composed of a key and a value. The key is used by the game to identify the type of command. The value is a string that can have any value. It’s the responsibility of the game to parse the value.