Games
Was this helpful?
Was this helpful?
Get a Player's score data for a specific Game.
The game id to get scores for
^[a-zA-Z0-9_-]+$
The player id to get scores for
^[a-zA-Z0-9_-]+$
Whether to include game objects in the response
false
GET /api/games/getPlayerScores?game_id=text&player_id=text HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"playerScores": [
{
"createdAt": "text",
"updatedAt": "text",
"score": 1,
"playerId": "text",
"gameObjectId": "text",
"gameObject": {
"id": "text",
"createdAt": "text",
"updatedAt": "text",
"name": "text",
"description": "text"
}
}
]
}
Get all Games. Paginated by default. Supports filtering and sorting.
10
0
Comma-separated Game IDs to filter by
Set to true
to enable fuzzy ID filtering. If false, only returns exact matches.
false
Comma-separated Game names to filter by
Set to true
to enable fuzzy name filtering. If false, only returns exact matches.
false
Comma-separated list of input tag IDs the resulting game must have
Comma-separated list of input tag IDs to exclude from the response. Use this to exclude games that have a specific input tag, even if they match the requiredTags
filter.
include
: Include all games, regardless of whether they have input tags or not.
exclude
: Exclude games that have no input tags.
untagged-only
: Only return games that have no input tags. Setting this option will ignore requiredTags
and excludeTags
, since tagged items shouldn't appear in the results.
include
Possible values: Field to sort by
Sort order for the selected field
Set to true
to include additional tags info in the response
false
Comma-separated list of Game IDs to exclude from the response
GET /api/games HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"games": [
{
"id": "text",
"name": "text",
"description": "text",
"createdAt": "text",
"updatedAt": "text",
"inputTags": [
"text"
],
"mode": "text",
"customCss": "text"
}
],
"tags": [
{
"id": "text",
"name": "text",
"description": "text",
"createdAt": "text",
"updatedAt": "text"
}
]
}
Get Game Count
Comma-separated Game IDs to filter by
Set to true
to enable fuzzy ID filtering. If false, only returns exact matches.
false
Comma-separated Game names to filter by
Set to true
to enable fuzzy name filtering. If false, only returns exact matches.
false
Comma-separated list of input tag IDs the resulting game must have
Comma-separated list of input tag IDs to exclude from the response. Use this to exclude games that have a specific input tag, even if they match the requiredTags
filter.
include
: Include all games, regardless of whether they have input tags or not.
exclude
: Exclude games that have no input tags.
untagged-only
: Only return games that have no input tags. Setting this option will ignore requiredTags
and excludeTags
, since tagged items shouldn't appear in the results.
include
Possible values: Comma-separated list of Game IDs to exclude from the response
GET /api/games/count HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"count": 1
}
Get a game by its ID.
ID value. Only alphanumeric, underscore, and hyphen are allowed.
^[a-zA-Z0-9_-]+$
false
false
GET /api/games/{id} HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"game": {
"id": "text",
"name": "text",
"description": "text",
"createdAt": "text",
"updatedAt": "text",
"inputTags": [
{
"id": "text",
"createdAt": "text",
"updatedAt": "text",
"name": "text",
"description": "text"
}
],
"defaultNumItemsPerRound": 1,
"mode": "text",
"modeConfigJson": "text",
"customCss": "text",
"gameObjects": [
{
"id": "text",
"name": "text",
"description": "text",
"createdAt": "text",
"updatedAt": "text"
}
]
}
}
Create a new Game
ID value. Only alphanumeric, underscore, and hyphen are allowed.
^[a-zA-Z0-9_-]+$
POST /api/games HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 48
{
"id": "text",
"name": "text",
"description": "text"
}
{
"createdGame": {
"id": "text",
"name": "text",
"description": "text",
"createdAt": "text",
"updatedAt": "text",
"mode": "text"
}
}
Update a Game by its ID
ID value. Only alphanumeric, underscore, and hyphen are allowed.
^[a-zA-Z0-9_-]+$
PUT /api/games/{id} HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 163
{
"data": {
"id": "text",
"name": "text",
"description": "text",
"inputTags": [
"text"
],
"defaultNumItemsPerRound": 1,
"mode": "text",
"modeConfigJson": "text",
"customCss": "text"
}
}
{
"updatedGameObject": {
"id": "text",
"createdAt": "text",
"updatedAt": "text",
"name": "text",
"description": "text",
"defaultNumItemsPerRound": 1,
"mode": "text",
"modeConfigJson": "text",
"customCss": "text"
}
}