Public API Guide
All documented endpoints below are under:
/api/public/v1
Examples in this docs set assume:
export BASE_URL="https://highlights-api.rankacy.com"
export TOKEN="rk_live_..."
Authentication
Use bearer token authentication for every request:
Authorization: Bearer <token>
Public API surface
Demos:
POST /demos/uploadGET /demosGET /demos/{demo_id}GET /demos/{demo_id}/kills
Highlights:
GET /highlightsGET /highlights/resolutionsGET /highlights/fpsPOST /highlightsPOST /highlights/by-ticksPOST /highlights/by-kill
Webhooks:
- processing terminal events:
demo.processed.successdemo.processed.failedhighlight.processed.successhighlight.processed.failed
Fast first call
curl -sS "$BASE_URL/api/public/v1/demos?limit=5&offset=0" \
-H "Authorization: Bearer $TOKEN" | jq
Upload -> options -> generate flow
curl -sS -X POST "$BASE_URL/api/public/v1/demos/upload" \
-H "Authorization: Bearer $TOKEN" \
-F "file=@$DEMO_FILE" | jq
curl -sS "$BASE_URL/api/public/v1/highlights/resolutions" \
-H "Authorization: Bearer $TOKEN" | jq
curl -sS "$BASE_URL/api/public/v1/highlights/fps" \
-H "Authorization: Bearer $TOKEN" | jq
curl -sS -X POST "$BASE_URL/api/public/v1/highlights" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"demo_id":52,"resolution_id":1,"fps_id":1}' | jq
Upload response now includes:
was_already_processed_successfullyuser_demo_assignment(newly_assignedoralready_assigned)
Python snippet (httpx)
import httpx
base_url = "https://highlights-api.rankacy.com"
token = "rk_live_..."
with httpx.Client(timeout=30) as client:
resp = client.get(
f"{base_url}/api/public/v1/demos",
headers={"Authorization": f"Bearer {token}"},
)
resp.raise_for_status()
print(resp.json())