Leaderboard
GET/api/v1/leaderboard
Authorization
bearer_token In: header
Query Parameters
Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.
Comma-separated sort keys, - for descending, at most 1. Keys: namespace. Default: namespace.
Rows per page, 1 to 100 (default 25).
1 <= value <= 100The page.next_cursor of the previous page. Cannot be combined with page.
A 1-based page number, for jumping. Cannot be combined with cursor.
1 <= valueSet to true to include the number of matching rows in page.total.
Response Body
application/json
curl -X GET "https://example.com/api/v1/leaderboard"{ "namespaces": [ { "entity_count": 0, "last_updated": 0, "metrics": [ "string" ], "namespace": "string" } ], "page": { "has_more": true, "next_cursor": "string", "page": 0, "total": 0 }}GET/api/v1/leaderboard/aggregate
Authorization
bearer_token In: header
Query Parameters
Rows per page, 1 to 100 (default 10).
1 <= value <= 100The page.next_cursor of the previous page. Cannot be combined with page.
A 1-based page number, for jumping. Cannot be combined with cursor.
1 <= valueComma-separated namespaces; a single namespace with group_by
Comma-separated metrics
Metadata field to group entities by
Metric weights as comma-separated key:value pairs (not with group_by, which sums the metrics)
Response Body
application/json
curl -X GET "https://example.com/api/v1/leaderboard/aggregate?metrics=string"{ "entries": [ { "id": "string", "meta": null, "metrics": { "property1": 0.1, "property2": 0.1 }, "rank": 0, "score": 0.1 } ], "page": { "has_more": true, "next_cursor": "string", "page": 0, "total": 0 }}POST/api/v1/leaderboard/{namespace}
Authorization
bearer_token In: header
Path Parameters
Leaderboard namespace
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Submission to create or update leaderboard entries
Response Body
application/json
curl -X POST "https://example.com/api/v1/leaderboard/string" \ -H "Content-Type: application/json" \ -d '{ "metrics": { "property1": 0.1, "property2": 0.1 } }'{ "id": "string", "rank": 0, "total_entities": 0, "weighted_score": 0.1}DELETE/api/v1/leaderboard/{namespace}
Authorization
bearer_token In: header
Path Parameters
Leaderboard namespace to delete
Response Body
application/json
curl -X DELETE "https://example.com/api/v1/leaderboard/string"{ "message": "string", "ok": true}GET/api/v1/leaderboard/{namespace}/around/{id}
Authorization
bearer_token In: header
Path Parameters
Leaderboard namespace
Entity ID
Query Parameters
Number of entries above and below to return
0 <= valueMetric weights as comma-separated key:value pairs
Response Body
application/json
curl -X GET "https://example.com/api/v1/leaderboard/string/around/string"[ { "id": "string", "meta": null, "metrics": { "property1": 0.1, "property2": 0.1 }, "rank": 0, "score": 0.1 }]POST/api/v1/leaderboard/{namespace}/batch
Authorization
bearer_token In: header
Path Parameters
Leaderboard namespace
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
A batch of score submissions for one namespace. Each entry's id is required
(there is no per-request principal default in batch mode). Entries are
applied independently and fail-fast; the server enforces a per-batch cap.
Response Body
application/json
curl -X POST "https://example.com/api/v1/leaderboard/string/batch" \ -H "Content-Type: application/json" \ -d '{ "entries": [ { "metrics": { "property1": 0.1, "property2": 0.1 } } ] }'{ "count": 0, "results": [ { "id": "string", "rank": 0, "total_entities": 0, "weighted_score": 0.1 } ]}GET/api/v1/leaderboard/{namespace}/meta/{id}
Authorization
bearer_token In: header
Path Parameters
Leaderboard namespace
Entity ID
Response Body
application/json
curl -X GET "https://example.com/api/v1/leaderboard/string/meta/string"nullGET/api/v1/leaderboard/{namespace}/metrics
Authorization
bearer_token In: header
Path Parameters
Leaderboard namespace
Query Parameters
Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.
Comma-separated sort keys, - for descending, at most 1. Keys: metric. Default: metric.
Rows per page, 1 to 100 (default 25).
1 <= value <= 100The page.next_cursor of the previous page. Cannot be combined with page.
A 1-based page number, for jumping. Cannot be combined with cursor.
1 <= valueSet to true to include the number of matching rows in page.total.
Response Body
application/json
curl -X GET "https://example.com/api/v1/leaderboard/string/metrics"{ "metrics": [ { "avg": 0, "entity_count": 0, "max": 0, "metric": "string", "min": 0 } ], "page": { "has_more": true, "next_cursor": "string", "page": 0, "total": 0 }}DELETE/api/v1/leaderboard/{namespace}/metrics/{metric}
Authorization
bearer_token In: header
Path Parameters
Leaderboard namespace
Metric name to delete
Response Body
application/json
curl -X DELETE "https://example.com/api/v1/leaderboard/string/metrics/string"{ "message": "string", "ok": true}GET/api/v1/leaderboard/{namespace}/time-window
Authorization
bearer_token In: header
Path Parameters
Leaderboard namespace
Query Parameters
Rows per page, 1 to 100 (default 10).
1 <= value <= 100The page.next_cursor of the previous page. Cannot be combined with page.
A 1-based page number, for jumping. Cannot be combined with cursor.
1 <= valueWindow start (Unix seconds); defaults to 24 hours before end_time
int64Window end (Unix seconds); defaults to now
int64Metric weights as comma-separated key:value pairs
Response Body
application/json
curl -X GET "https://example.com/api/v1/leaderboard/string/time-window"{ "entries": [ { "id": "string", "meta": null, "metrics": { "property1": 0.1, "property2": 0.1 }, "rank": 0, "score": 0.1 } ], "page": { "has_more": true, "next_cursor": "string", "page": 0, "total": 0 }}GET/api/v1/leaderboard/{namespace}/top
Authorization
bearer_token In: header
Path Parameters
Leaderboard namespace
Query Parameters
Rows per page, 1 to 100 (default 10).
1 <= value <= 100The page.next_cursor of the previous page. Cannot be combined with page.
A 1-based page number, for jumping. Cannot be combined with cursor.
1 <= valueMetric weights as comma-separated key:value pairs Example: "kills:1.0,accuracy:0.5"
Response Body
application/json
curl -X GET "https://example.com/api/v1/leaderboard/string/top"{ "entries": [ { "id": "string", "meta": null, "metrics": { "property1": 0.1, "property2": 0.1 }, "rank": 0, "score": 0.1 } ], "page": { "has_more": true, "next_cursor": "string", "page": 0, "total": 0 }}GET/api/v1/leaderboard/{namespace}/{id}
Authorization
bearer_token In: header
Path Parameters
Leaderboard namespace
Entity ID
Query Parameters
Metric weights as comma-separated key:value pairs Example: "kills:1.0,accuracy:0.5"
Response Body
application/json
curl -X GET "https://example.com/api/v1/leaderboard/string/string"nullDELETE/api/v1/leaderboard/{namespace}/{id}
Authorization
bearer_token In: header
Path Parameters
Leaderboard namespace
Entity ID to delete
Response Body
application/json
curl -X DELETE "https://example.com/api/v1/leaderboard/string/string"{ "message": "string", "ok": true}GET/api/v1/leaderboard/{namespace}/{metric}/top
Authorization
bearer_token In: header
Path Parameters
Leaderboard namespace
Metric name
Query Parameters
Rows per page, 1 to 100 (default 10).
1 <= value <= 100The page.next_cursor of the previous page. Cannot be combined with page.
A 1-based page number, for jumping. Cannot be combined with cursor.
1 <= valueResponse Body
application/json
curl -X GET "https://example.com/api/v1/leaderboard/string/string/top"{ "entries": [ { "id": "string", "meta": null, "metrics": { "property1": 0.1, "property2": 0.1 }, "rank": 0, "score": 0.1 } ], "page": { "has_more": true, "next_cursor": "string", "page": 0, "total": 0 }}