Get legal moves (public)
GET
/games/{id}/moves
const url = 'https://play-api.jc.id.lv/games/example/moves';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://play-api.jc.id.lv/games/example/movesThe full legal-move tree for the pending roll, never capped.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Game id.
Responses
Section titled “Responses”The legal-move tree tied to the current roll.
Media typeapplication/json
object
version
required
integer
dfen
required
string
dicePending
required
boolean
legalMoves
required
A prefix tree of UCI micro-moves. Each key is a micro-move; its value is the tree of legal continuations. A leaf ({}) is a complete legal turn. An empty top-level tree means a forced pass. On inline copies, null means the enumeration was too large — fetch GET /games/{id}/moves.
object
key
additional properties
object recursive
Examplegenerated
{ "version": 1, "dfen": "example", "dicePending": true, "legalMoves": { "additionalProperty": {} }}Unknown resource.