Download OpenAPI specification:Download
Shutdown the current worker.
This endpoint sends a shutdown command to the current worker's command queue. The worker will gracefully shut down all running game server instances and terminate the worker service.
:return: success response with worker ID
nullGet all game server configs
Although it seems strange for us to return configs instead of instances, this is the way the API is designed. We want to make the /gameserver/ endpoint the way you would interact with a game server. The whole instance thing should be abstracted away from the user.
:return: list of game server configs
[- {
- "game_server_config_id": 0,
- "game_server_id": 0,
- "is_default": false,
- "is_visible": true,
- "name": "string",
- "executable": "string",
- "args": [
- "string"
], - "env_var": [
- "string"
]
}
]Given the game server config ID, stop a game server instance
Finds the current worker, and sends a stop command to it It is up to the worker to handle the command and stop the game server instance.
This endpoint provides an abstract gameserver interface to users, so they don't have to know about the worker and how it works
:param id: game server config ID :param channel: rabbitmq channel :return: arbitrary response
| id required | integer (Id) |
nullSend a stdin command to the game server config's running instance
This finds the current worker, and sends a stdin command to it It is up to the worker to handle the command and send it to the game server instance.
This endpoint does not have a bheavior defined if no server is running.
:param id: game server config ID :param channel: rabbitmq channel :param body: StdinCommandRequest :return: arbitrary response
| id required | integer (Id) |
| commands required | Array of strings (Commands) |
{- "commands": [
- "string"
]
}nullGet all active game server instances for the current worker.
{- "game_server_instances": [
- {
- "game_server_instance_id": 0,
- "game_server_config_id": 0,
- "end_date": "2019-08-24T14:15:22Z",
- "worker_id": 0,
- "last_heartbeat": "2019-08-24T14:15:22Z"
}
], - "workers": [
- {
- "worker_id": 0,
- "created_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z",
- "last_heartbeat": "2019-08-24T14:15:22Z"
}
], - "configs": [
- {
- "game_server_config_id": 0,
- "game_server_id": 0,
- "is_default": false,
- "is_visible": true,
- "name": "string",
- "executable": "string",
- "args": [
- "string"
], - "env_var": [
- "string"
]
}
]
}