Health check
curl --request GET \
--url https://web-api.soxai.site/api/healthimport requests
url = "https://web-api.soxai.site/api/health"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://web-api.soxai.site/api/health', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "healthy",
"message": "Service is running"
}{
"error": "rate-limited",
"error_msg": "Rate limit exceeded. Retry after <n> seconds."
}{
"error": "error",
"error_msg": "unhealthy dependencies: influxdb_query_db"
}System
Health check
Report whether the API and the services it depends on are reachable.
The response names the dependency that failed and nothing about why: this route carries no authentication, so the underlying error - which would carry the GCP project, database name or InfluxDB host - stays in the server log.
Parameters
- None. This endpoint takes no path, query or body parameter.
Response
200when everything is reachable.500when a dependency is not, naming which one inmessage.
Errors
| Status | Condition |
|---|---|
| 500 | A dependency is unreachable. The body names which one; the reason is in the server log. This is the one endpoint where a 500 is an answer rather than a fault |
Authorization
- No authentication, so a monitor or load balancer can call it without credentials.
GET
/
api
/
health
Health check
curl --request GET \
--url https://web-api.soxai.site/api/healthimport requests
url = "https://web-api.soxai.site/api/health"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://web-api.soxai.site/api/health', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "healthy",
"message": "Service is running"
}{
"error": "rate-limited",
"error_msg": "Rate limit exceeded. Retry after <n> seconds."
}{
"error": "error",
"error_msg": "unhealthy dependencies: influxdb_query_db"
}Response
Every dependency is reachable.