REST API Reference¶
Who is this page for?
Integrators who want the complete endpoint surface in one place. This is a curated catalog; the authoritative, always-current contract is the live OpenAPI schema your deployment serves.
The live, interactive contract¶
Every running instance generates its API reference from the code:
Tool |
Path |
Use it for |
|---|---|---|
Swagger UI |
|
Try requests in the browser (with OAuth2 login wired in). |
ReDoc |
|
Clean, readable reference. |
OpenAPI JSON |
|
Generate clients/SDKs. |
Each endpoint in the code carries rich OpenAPI metadata - summaries, per-status response examples, and request/response schemas - so the generated docs are detailed, not skeletal.
Conventions¶
Base path - every path below is relative to
/api/v1.Auth - unless noted, endpoints accept
X-API-Keyor a Keycloak bearer token (Authentication). A few are OAuth2-only.Ids -
{gameId}/{taskId}are internal UUIDs;{externalTaskId}/{externalUserId}are your strings (Domain Model).Errors -
401(no/invalid creds),403(out of scope / rejected key),404(not found),422(validation),429(rate limit),500(server error).
Endpoint catalog¶
API keys (/apikey)¶
Path |
Purpose |
|
|---|---|---|
|
|
Issue a new API key (OAuth2 + admin). |
|
|
List API keys. |
|
|
Remove a key by prefix. |
Games (/games)¶
Path |
Purpose |
|
|---|---|---|
|
|
List games (paginated, scoped). |
|
|
Create a game. |
|
|
Get one game. |
|
|
Update a game (incl. |
|
|
Delete a game. |
|
|
Deep-copy a game with its tasks/params. |
|
|
Inspect the game’s effective strategy. |
|
|
List users enrolled in the game. |
Tasks (/games/{gameId}/tasks)¶
Path |
Purpose |
|
|---|---|---|
|
|
Create a task. |
|
|
Create many tasks. |
|
|
List tasks. |
|
|
Get one task. |
|
|
Update a task. |
|
|
Delete a task. |
|
|
Duplicate a task. |
Points & actions (/games/...)¶
Path |
Purpose |
|
|---|---|---|
|
|
Award points to a user. |
|
|
Record a user action (may award points). |
|
|
All points in a game. |
|
|
…with per-award detail. |
|
|
One user’s total in a game. |
|
|
Simulated points (OAuth2-only, own subject). |
|
|
All users’ points in a task. |
|
|
…with detail. |
|
|
One user in one task. |
Users, wallets & conversion (/users)¶
Path |
Purpose |
|
|---|---|---|
|
|
List users. |
|
|
Create a user. |
|
|
A user’s points everywhere. |
|
|
Bulk/filtered points query. |
|
|
Assign points to a user directly. |
|
|
Read a user’s wallet. |
|
|
Preview a points→coins conversion. |
|
|
Execute a conversion. |
|
|
Record a user action. |
Strategies (built-in) (/strategies)¶
Path |
Purpose |
|
|---|---|---|
|
|
List available strategies. |
|
|
Strategy metadata. |
|
|
Configurable variables. |
|
|
Rendered logic graph. |
Custom strategies / DSL (/strategies/custom)¶
Path |
Purpose |
|
|---|---|---|
|
|
Create / list custom strategies. |
|
|
Get / update (new draft). |
|
|
Publish a version. |
|
|
Archive. |
|
|
List versions. |
|
|
Roll back. |
|
|
Where it’s used. |
|
|
Simulate an ad-hoc AST. |
|
|
Simulate a stored strategy. |
|
|
Starter templates. |
|
|
Import a strategy. |
|
|
Per-strategy execution metrics. |
|
|
A/B comparison. |
Analytics, exports & ops¶
Path |
Purpose |
|
|---|---|---|
|
|
Service health/readiness. |
|
|
Dashboard summary. |
|
|
Recent log feed. |
|
|
Export users. |
|
|
Export user points. |
|
|
Export interactions. |
|
|
Export wallet ledger. |
|
|
Export audit history. |
Note
This catalog is maintained by hand for orientation. When in doubt, trust
/openapi.json from your deployment - it is generated from the code and
cannot drift.