Score Submission - POST /scores
Sends a score to the server.
Expected Request
Key |
Type |
Description |
---|---|---|
|
Chart Object |
Contains information about the chart being played. This may be used by the server to accept new charts onto the IR. |
|
Score Object |
Contains information about the users’ score. |
Chart Object
Key |
Type |
Description |
---|---|---|
|
String |
The unique identifier for the chart the user played. |
|
String |
The artist who created the song. |
|
String |
The song title. |
|
Integer [1,20] |
The difficulty level assigned to this chart. |
|
0 | 1 | 2 | 3 |
The difficulty of the chart. 0 = NOV, 1 = ADV, 2 = EXH, 3 = INF. |
|
String |
The effector (charter) for the chart. |
|
String |
The illustrator for the chart jacket. |
|
String |
A string representing BPM. For charts with multiple bpms, they are separated by a hyphen, like x.xx-y.yy. |
Score Object
Key |
Type |
Description |
---|---|---|
|
Integer [0, 10’000’000] |
The numeric score the user achieved. |
|
Float |
The gauge the user had at the end of the chart. Depending on gameflags, this should be used by the server to determine the clear type on the chart. |
|
Integer (unix_seconds) |
Time in seconds elapsed since Unix Epoch, indicating when this score was achieved. |
|
Integer |
Hits inside the critical window. |
|
Integer |
Hits inside the near window. |
|
Integer |
Hits inside the near window which were early. |
|
Integer |
Hits inside the near window which were late. |
|
Integer |
Best combo reached. |
|
Integer |
Missed notes. |
|
Options Object |
The options in use. Includes gauge type, etc, see below. |
|
Object: { |
Indicates what the hit windows were for this score. The defaults are; 46, 150, 150, 300, and 84 respectively. |
Warning
It is highly advised for servers to reject scores with non-standard score.windows
unless specifically implementing a hard-mode option.
Warning
score.timestamp
is in unix seconds, which is different to the default in languages of the JavaScript family (unix_miliseconds) and the .NET family (Ticks).
Make sure to account for this if your server expects a different format for time!
Options Object
Key |
Type |
Description |
---|---|---|
|
Integer |
An enum value representing the gauge type used. 0 = normal, 1 = hard. Further values are not currently specified. |
|
Integer |
Not used at the moment. Intended for blastive rank, etc. in the future. |
|
Boolean |
If mirror is enabled. |
|
Boolean |
If random is enabled. |
|
Integer |
A bitfield of elements of the game that are automated. Any non-zero value means that the score was at least partially auto. |
Expected Response
statusCode 42
.statusCode 22
. In this case, body
should be as follows, but with only sendReplay
(if the server desires the replay - otherwise, an empty object.)Otherwise, returns the standard API response, with body
as follows:
Key |
Type |
Description |
---|---|---|
|
Server Score Object |
A Server Score object representing the user’s personal best score. |
|
Server Score Object |
A Server Score object representing the current server record. |
|
Array<Server Score Object> |
An array of 0 to N Server Scores adjacently above the user’s PB. |
|
Array<Server Score Object> |
An array of 0 to N Server scores adjacently below the user’s PB. |
|
Boolean |
True if the score sent in the request is the user’s new PB. |
|
Boolean |
True if the score sent in the request is the new server record. |
|
String |
If provided, the server is requesting that the replay be sent using the value of this key as the identifier. |
Warning
body.score
always returns the users PB. It does NOT necessarily return the score you sent.
Warning
Several key assumptions are made about the response by the client, which must be upheld by the server. They are as follows:
adjacentAbove
will never contain the current server record.The returned scores will always descend in the set […
adjacentAbove
,score
, …adjacentBelow
]. For clarification, see the note below.An individual user should only have a maximum of one score in the above set. This is because the scores sent should always be personal bests, not any stored score.
As a corollary to the above, the requesting user’s scores can never appear in the adjacent scores, since their personal best will always be contained in
score
.
Note
The server may decide on the value of N to use for adjacentAbove/Below. However, there is limited space to display the scores. For maximum compatibility with skins, a value of 2 or 3 is recommended.
Note
The use for score.adjacent[Above|Below]
and score.serverRecord
is illustrated in the table below.
Element |
Score |
Ranking |
---|---|---|
|
LV.MINI 10,000,000 |
#1 |
… |
||
|
zkldi 95,753,163 |
#8 |
|
NEIL.C 94,472,194 |
#9 |
|
YOU 93,193,547 |
#10 |
|
POG 92,541,147 |
#11 |
|
CHAMP 91,260,754 |
#12 |