Health check, per dependency
curl --request GET \
--url https://web-api.soxai.site/api/health_checkimport requests
url = "https://web-api.soxai.site/api/health_check"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://web-api.soxai.site/api/health_check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "healthy",
"checks": {
"firestore": {
"status": "healthy"
},
"influxdb_query_db": {
"status": "healthy"
},
"influxdb_raw_db": {
"status": "healthy"
}
}
}{
"error": "rate-limited",
"error_msg": "Rate limit exceeded. Retry after <n> seconds."
}{
"error": "internal-server-error",
"error_msg": "Failed to fetch data: <error_message>"
}System
Health check, per dependency
Report the health of each dependency separately: Firestore, and both
InfluxDB clients (query_db and raw_db).
/api/health answers the same question as a single verdict; this one is for finding out
which component is at fault. As there, the reason is logged rather than returned.
Parameters
- None. This endpoint takes no path, query or body parameter.
Response
200{"status": "healthy" | "unhealthy", "checks": {"firestore": {...}, "influxdb_query_db": {...}, "influxdb_raw_db": {...}}}. A component that is down makes the overallstatusunhealthy.
Errors
- None. A component that is down is reported inside the
200body, so a monitor readsstatusrather than the status code.
Authorization
- No authentication, so a monitor can call it without credentials.
GET
/
api
/
health_check
Health check, per dependency
curl --request GET \
--url https://web-api.soxai.site/api/health_checkimport requests
url = "https://web-api.soxai.site/api/health_check"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://web-api.soxai.site/api/health_check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "healthy",
"checks": {
"firestore": {
"status": "healthy"
},
"influxdb_query_db": {
"status": "healthy"
},
"influxdb_raw_db": {
"status": "healthy"
}
}
}{
"error": "rate-limited",
"error_msg": "Rate limit exceeded. Retry after <n> seconds."
}{
"error": "internal-server-error",
"error_msg": "Failed to fetch data: <error_message>"
}Response
Per-component health. A component that is down makes the overall status unhealthy, and the response carries that status code rather than a 200.