ManMan Experience API (0.1.0)

Download OpenAPI specification:Download

Worker Current

Responses

Response samples

Content type
application/json
{
  • "worker_id": 0,
  • "created_date": "2019-08-24T14:15:22Z",
  • "end_date": "2019-08-24T14:15:22Z",
  • "last_heartbeat": "2019-08-24T14:15:22Z"
}

Worker Shutdown

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

Responses

Response samples

Content type
application/json
null

Get Game Servers

Get 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

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Start Game Server

Given the game server config ID, start a game server instance

:param id: game server config ID :param channel: rabbitmq channel :return: arbitrary response

path Parameters
id
required
integer (Id)

Responses

Response samples

Content type
application/json
null

Stop Game Server

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

path Parameters
id
required
integer (Id)

Responses

Response samples

Content type
application/json
null

Stdin Game Server

Send 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

path Parameters
id
required
integer (Id)
Request Body schema: application/json
commands
required
Array of strings (Commands)

Responses

Request samples

Content type
application/json
{
  • "commands": [
    ]
}

Response samples

Content type
application/json
null

Get Active Game Server Instances

Get all active game server instances for the current worker.

Responses

Response samples

Content type
application/json
{
  • "game_server_instances": [
    ],
  • "workers": [
    ],
  • "configs": [
    ]
}

Health

Responses

Response samples

Content type
application/json
"string"