Host a new multiplayer game.
POST /api/v1/game/host HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer ...
{
"playId": "bfba9f87-c805-4f13-8e60-77d2473e4867",
"name": "Would you like to play a game?",
"maxPlayers": 8,
"settings": {
"map": "2fort5",
"health": 1.5,
"bestOf": 3
}
}
----------------------------------------
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"instanceId": "a2c4f9bd-b698-4b21-839d-81e75e514d0c",
"gameId": "a2c4f9bd-b698-4b21-839d-81e75e514d0c",
"socketUrl": "wss://ws1.theendlessmission.com/game/a2c4f9bd-b698-4b21-839d-81e75e514d0c",
"accessToken": "eyJhb...Qjg"
}Authentication is required.
NONE
NONE
| Name | Description | Value |
|---|---|---|
| playId | the ID of the game being played on this instance; it may be a UUID of an entity (by reivision), or it may be another identifier known by the game client.NOTE: this field is currently optional during an introductory period. If not given, playId will be stored as the empty string. | string |
| name | the display name for this multiplayer game in listings | string |
| maxPlayers | the number of players that can join | number |
| settings | a game-type-specific bag of settings, to be given to a player joining the game; no schema is enforced on these settings optionalThis may be the basis of fine-grained search and sort in future. | object |
Successful responses are code 200 with data in the response body. Other error responses are standard.
| Name | Description | Value |
|---|---|---|
| intanceId | the ID of the game that was created | string |
| gameId | the ID of the game that was created. NOTE: this field is deprecated and will be removed. Use instanceId instead. | string |
| socketUrl | the URL to use to establish a WebSocket connection | string |
| accessToken | a token granting access to the socket host, as a JWT | string |