Get Health Status By Type and ID
GET /v1/healthcheck/{src_type}/{src_id}
GET /v1/healthcheck/{src_type}/{src_id}Interactive request editor loads with JavaScript.
Path Parameters
src_type*string
The specified resource type.
Value in
- "routes"
- "services"
- "upstreams"
- "stream_routes"
src_id*string
The specified node ID.
Response Body
application/json
application/json
application/json
curl -X GET "http://127.0.0.1:9090/v1/healthcheck/routes/1"OK
{
"nodes": [
{
"ip": "52.86.68.46",
"counter": {
"http_failure": 0,
"success": 2,
"timeout_failure": 0,
"tcp_failure": 0
},
"port": 80,
"status": "healthy"
},
{
"ip": "100.24.156.8",
"counter": {
"http_failure": 5,
"success": 0,
"timeout_failure": 0,
"tcp_failure": 0
},
"port": 80,
"status": "unhealthy"
}
],
"type": "http",
"name": "/apisix/routes/1"
}Invalid src type
{
"error_msg": "string"
}Resource or health checker not found
{
"error_msg": "string"
}Failed to render the HTML health-check response.
{
"error_msg": "string"
}Complete operation details and schema variants
GET /v1/healthcheck/{src_type}/{src_id}
Get Health Status By Type and ID
Get health status of a specified resource.
Parameters
src_type(path, string, required): The specified resource type.src_id(path, string, required): The specified node ID.
Responses
200: OK400: Invalid src typeerror_msg(string, required):404: Resource or health checker not found Response fields (application/json): identical toGET /v1/healthcheck/{src_type}/{src_id}, response 400 above.503: Failed to render the HTML health-check response. Response fields (application/json): identical toGET /v1/healthcheck/{src_type}/{src_id}, response 400 above.
cURL
curl -X GET 'http://127.0.0.1:9090/v1/healthcheck/{src_type}/{src_id}'