UNLOCK API
getQueueStats

getQueueStats

Returns the current queue: tasks waiting, tasks being solved and the average solving time over the last hour. The numbers come from real tasks, not estimates.
POSThttps://unlock-api.com/getQueueStats

Request parameters

clientKey
StringRequired
Your API key, 32 characters, from the account page.

Request

POST /getQueueStats
{
  "clientKey": "YOUR_API_KEY"
}

Response

Success
{
  "errorId": 0,
  "waiting": 3,
  "solving": 12,
  "speed": 6.4,
  "total": 15
}

Response fields

errorId
Integer
0 when the request worked, 1 when it did not.
waiting
Integer
Tasks waiting to be sent to a solver.
solving
Integer
Tasks being solved now.
speed
Number
Average solving time in seconds over the last hour, or null if nothing was solved.
total
Integer
waiting plus solving.

Code samples

curl -s https://unlock-api.com/getQueueStats \
  -H "Content-Type: application/json" \
  -d '{"clientKey":"YOUR_API_KEY"}'

Errors this method can return

  • The key is wrong. Copy it again from the account page. (in.php and res.php: ERROR_WRONG_USER_KEY)