POST socket-server/{serverId}/games

Perform a batch update of games on a socket server.

Example

POST /api/v1/socket-server/20/games HTTP/1.1
Authorization: Signature ...
Content-Type: application/json

[{
  "kind": "update",
  "game": "21b2330e-1f67-4e0f-9362-a447d5d2876c",
  "currentPlayers": 5,
},{
  "kind": "update",
  "game": "c7489532-d5c9-41c2-a045-91b53298cb94",
  "maxPlayers": 8,
  "name": "Let's play!",
},{
  "kind": "delete"
  "game": "752ea799-5f60-4e2c-bd63-729540392685",
}]
----------------------------------------
HTTP/1.1 204 No Content
ETag: W/"a-bAsFyilMr4Ra1hIU5PyoyFRunpI"

Security

Authentication is required and restricted to system processes. Requests should be signed using a System key.

URL Parameters

NameDescriptionValue
serverIdthe ID of the server, 0 to 255number

Request Body

The request body is an array of batch operations, see types Update and Delete. Update operations should include only the properties that have changed.

Update Operation

NameDescriptionValue
kindoperation type discriminatorliteral: update
gamethe game ID to updatestring
namethe name of the game optionalstring
maxPlayersthe maximum allowed players for this server optionalnumber
currentPlayersthe current players connected to this server optionalnumber

Delete Operation

NameDescriptionValue
kindoperation type discriminatorliteral: delete
gamethe game ID to deletestring

Response

Successful responses are code 204. Error responses are standard.

Response Body

NONE