Skip to Content
AnySolver logo
AnySolver

health

Check from a monitor or load balancer whether the AnySolver API can accept tasks. GET /health needs no API key and answers 200 when ready, 503 when not.

GET /health answers HTTP 200 with {"status": "ok"} when the API can accept tasks, and HTTP 503 when it cannot. It needs no API key. Act on the HTTP status code: unlike the other endpoints, which answer HTTP 200 for errors too, this one signals failure with its status.

GEThttps://api.anysolver.com/health

Request

Send a GET request with no body and no clientKey.

curl https://api.anysolver.com/health

Response body

FieldTypeRequiredDescription
status*
stringYes

ok when the API can accept tasks (HTTP 200).

Example: ok

Example

A healthy API answers with HTTP 200:

HTTP 200
{
    "status": "ok"
}

Unavailable

When the task store does not accept writes, the API cannot create tasks and the endpoint answers HTTP 503 with an error body. Take the instance out of rotation until it answers HTTP 200 again.

HTTP 503
{
    "errorId": 1,
    "errorCode": "SERVICE_UNAVAILABLE",
    "errorDescription": "Task store is not accepting writes."
}