Leaderboard Controller

Save Score

Path: /api/leaderboard/score

Method: POST

Example Http Request

POST /api/leaderboard/score HTTP/1.1
Content-Type: application/json
Content-Length: 159
Host: localhost:8080

{"leaderboardId":"83d847bb-4e90-4b3d-9cdd-ec3cbc64bf5e","rankValue":1000,"displayValue":"10:30.45","fromSessionId":null,"data":{"difficulty":"hard","level":5}}

Example Http Response

HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 363

{"id":"6ab4dfd9d01b2142cbf3f2d8","leaderboardId":"83d847bb-4e90-4b3d-9cdd-ec3cbc64bf5e","playerId":"test-player-55fac399-92ef-4bb6-818c-40b6324d4652","displayName":"Test Player test-player-55fac399-92ef-4bb6-818c-40b6324d4652","rankValue":1000,"displayValue":"10:30.45","timestamp":"24/09/2026 08:31:21.355","position":null,"data":{"difficulty":"hard","level":5}}

Example Curl Request

$ curl 'http://localhost:8080/api/leaderboard/score' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '{"leaderboardId":"83d847bb-4e90-4b3d-9cdd-ec3cbc64bf5e","rankValue":1000,"displayValue":"10:30.45","fromSessionId":null,"data":{"difficulty":"hard","level":5}}'

Leaderboard Controller Footer