v1

latestOpenAPI 3.0.32026-07-26131237.0 KB
Commands

Start or reset game instance

Creates a new game session or resets an existing one, depending on the presence of guid in the request body:

Omit guid or set it to null → start a brand-new game instance.
Provide an existing guid → reset that session.

  • If at least one ACTION command has been issued since the last level transition, only the current level is restarted.
  • If no ACTIONs have been issued, the entire game resets.
    Two consecutive RESETs therefore guarantee a completely fresh game.

The call always returns the first (or refreshed) frame of the game state, along with updated score and win condition.

Note: The response includes cookies (particularly AWSALB* cookies) that must be included in all subsequent ACTION commands for this session. These cookies ensure requests are routed to the same backend instance maintaining your game state.

post/api/cmd/RESET

Request body

game_idstring required

Identifier of the game to start or reset (e.g. ls20).

card_idstring required

scorecard identifier returned by OpenScorecardResponse. Required to attribute this play to the correct scorecard.

guidstring nullable

Server-generated game session ID.
• Omit or set to null to create a new game.
• Provide an existing value to reset that game as described above.

Response

First frame after starting or resetting the session.

game_idstring required

Game identifier for the running session.

guidstring required

Server-generated session ID; use this for all subsequent commands.

state'NOT_FINISHED' | 'NOT_STARTED' | 'WIN' | 'GAME_OVER' required

Current state of the session:

NOT_FINISHED - game in progress, not yet WIN or GAME_OVER.
NOT_STARTED - session has ended (WIN or GAME_OVER) and requires RESET.
WIN - session ended in victory.
GAME_OVER - session ended in defeat.

levels_completedinteger required

Current cumulative number of levels completed for this run.

win_levelsinteger required

Level threshold required to reach the WIN state. Mirrors the game's configured win condition so agents can adapt dynamically without hard-coding values.

available_actionsinteger[] required

List of available actions for the current game.