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":"42deff4c-2667-43fe-8f3f-317e1ccbcbdf","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":"6a125bf2e8ba4c66f8c038e1","leaderboardId":"42deff4c-2667-43fe-8f3f-317e1ccbcbdf","playerId":"test-player-4bf66aa2-1439-4074-9448-df412919cc8d","displayName":"Test Player test-player-4bf66aa2-1439-4074-9448-df412919cc8d","rankValue":1000,"displayValue":"10:30.45","timestamp":"24/05/2026 02:01:22.807","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":"42deff4c-2667-43fe-8f3f-317e1ccbcbdf","rankValue":1000,"displayValue":"10:30.45","fromSessionId":null,"data":{"difficulty":"hard","level":5}}'

Leaderboard Controller Footer