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":"8d5175f2-a014-4157-b223-ce31dd76719f","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":"6b0792e4982de722b515ce25","leaderboardId":"8d5175f2-a014-4157-b223-ce31dd76719f","playerId":"test-player-da5f5a5f-6423-447d-b901-51502048dce7","displayName":"Test Player test-player-da5f5a5f-6423-447d-b901-51502048dce7","rankValue":1000,"displayValue":"10:30.45","timestamp":"26/11/2026 02:01:08.163","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":"8d5175f2-a014-4157-b223-ce31dd76719f","rankValue":1000,"displayValue":"10:30.45","fromSessionId":null,"data":{"difficulty":"hard","level":5}}'
Leaderboard Controller Footer