-
Notifications
You must be signed in to change notification settings - Fork 25
Entering attempts with external devices
There has been a growing interest in developing dedicated devices for automated data entry directly from timers. Such devices must be used under the discretion of the Delegate team and and the WRC.
For this purpose, WCA Live exposes an API endpoint to submit an attempt result programmatically.
You first need to obtain a personal scoretaking token on the Account page. This token is valid for 7 days and specific to the selected competition.
Having the token, authorize API requests with the header Authorization: Bearer {SCORETAKING_TOKEN}
.
POST https://live.worldcubeassociation.org/api/enter-attempt
{
"competitionWcaId": "MyCompetition2023",
"eventId": "333",
"roundNumber": 1,
"registrantId": 5,
"attemptNumber": 1,
"attemptResult": 1025
}
For the "attemptResult"
format refer to this section. In order to clear an attempt, use the value 0
(skipped).
POST https://live.worldcubeassociation.org/api/enter-results
{
"competitionWcaId": "MyCompetition2023",
"eventId": "333",
"roundNumber": 1,
"results": [{
"registrantId": 5,
"attempts": [
{ "result": 1025 },
{ "result": 1100 },
{ "result": 1265 },
{ "result": 1010 },
{ "result": 905 }
]
}, {
"registrantId": 10,
"attempts": [
{ "result": 1305 },
{ "result": 1170 },
{ "result": 1250 },
{ "result": 1120 },
{ "result": 1400 }
]
}]
}
This endpoint replaces all attempts for the specified competitors. Note that trailing skipped attempt results (value 0
) must be omitted.