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":"1fe0c53f-31ef-453b-be53-3ecc777b2972","rankValue":1000,"displayValue":"10:30.45","fromSessionId":null,"data":{"level":5,"difficulty":"hard"}}

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":"69cdcddffe899e1bd4351fe3","leaderboardId":"1fe0c53f-31ef-453b-be53-3ecc777b2972","playerId":"test-player-ff4e1870-3e7b-41ba-95ac-2e97b836f8e3","displayName":"Test Player test-player-ff4e1870-3e7b-41ba-95ac-2e97b836f8e3","rankValue":1000,"displayValue":"10:30.45","timestamp":"02/04/2026 02:01:03.750","position":null,"data":{"level":5,"difficulty":"hard"}}

Example Curl Request

$ curl 'http://localhost:8080/api/leaderboard/score' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '{"leaderboardId":"1fe0c53f-31ef-453b-be53-3ecc777b2972","rankValue":1000,"displayValue":"10:30.45","fromSessionId":null,"data":{"level":5,"difficulty":"hard"}}'

Leaderboard Controller Footer