Get Worker Route Health
Endpoint
GET /apiops/projects/{projectName}/apiProxies/{apiProxyName}/environments/{environmentName}/route-health/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name (must exist) |
| environmentName | string | Yes | Environment name (must exist) |
Query Parameters
None.
Request Body
This endpoint does not require a request body.
Response
Success Response (200 OK)
{
"status": "SUCCESS",
"resultList": [
{
"routeActive": true,
"servedPath": "/api/v1/pets",
"methods": ["GET", "POST"],
"apinizerRootContext": "/apigateway",
"podsResponded": 2,
"podsActive": 2,
"deployedInManager": true,
"inconsistent": false,
"pods": [
{
"routeActive": true,
"servedPath": "/api/v1/pets",
"methods": ["GET", "POST"],
"workerPodIp": "http://10.0.1.11:8091",
"apinizerRootContext": "/apigateway"
},
{
"routeActive": true,
"servedPath": "/api/v1/pets",
"methods": ["GET", "POST"],
"workerPodIp": "http://10.0.1.12:8091",
"apinizerRootContext": "/apigateway"
}
]
}
],
"resultCount": 1
}
Response Fields
| Field | Type | Description |
|---|---|---|
| status | string | Request status (SUCCESS or FAILURE) |
| resultList | array | Single-element array with the aggregated route health result |
| resultList[].routeActive | boolean | true only when every worker pod that answered reports the route as active. A partial deploy (some pods stale) surfaces as false even though some pods are healthy — inspect pods for the breakdown |
| resultList[].servedPath | string | Invoke path the (first) active worker pod is serving; null if no pod reports the route as active |
| resultList[].methods | array[string] | HTTP methods accepted by the route on the first active pod |
| resultList[].apinizerRootContext | string | Gateway root context prefix, read from GeneralSettings on the manager (not from the pods) |
| resultList[].podsResponded | integer | Number of worker pods that answered the probe (successfully or with an error) |
| resultList[].podsActive | integer | Number of worker pods that reported the route as active |
| resultList[].deployedInManager | boolean | What the manager's own deployment record says for this environment — the same flag the management screen renders as deployed/undeployed |
| resultList[].inconsistent | boolean | true when the manager record and the workers disagree (see below). Always false when no pod answered, because the worker state is then simply unknown |
| resultList[].pods | array | Raw per-pod probe results, including pods that errored |
| resultList[].pods[].routeActive | boolean | Whether this specific pod has the proxy loaded and marshalled into its routing table |
| resultList[].pods[].servedPath | string | Invoke path this pod is serving |
| resultList[].pods[].methods | array[string] | HTTP methods this pod's route accepts |
| resultList[].pods[].workerPodIp | string | Worker pod hostname/IP (or management API URL) that produced this answer |
| resultList[].pods[].apinizerRootContext | string | Root context this specific worker pod is running with |
| resultList[].pods[].error | string | Present only if this pod could not be probed (e.g. proxy not loaded, network failure) |
| resultCount | integer | Always 1 |
Consistency Between the Manager and the Workers
deployedInManager and routeActive describe two different sources of truth, and they can drift apart. inconsistent tells you when they disagree:
| deployedInManager | routeActive | Meaning |
|---|---|---|
true | true | Healthy — the API Proxy is deployed and every reachable worker pod serves it |
false | true | Orphan deployment — the management screen shows the environment as undeployed, but the gateway keeps answering with the configuration snapshot it received at deployment time. Later changes made in the manager never reach it and no "redeploy required" warning appears. Redeploy to refresh it, or undeploy explicitly to remove the route |
true | false | The deployment did not reach the worker pods (or not all of them — check podsActive against podsResponded). A redeploy is needed |
false | false | Healthy — the API Proxy is undeployed and no worker serves it |
Use this endpoint to scan for orphan deployments: probe the environments an API Proxy is not deployed to and treat every inconsistent: true answer as a route that must be cleaned up.
Error Response (400 Bad Request)
{
"status": "FAILURE",
"resultMessage": "ApiProxy with name (petstore-api) is not found!"
}
Common Causes
apiProxyNameis emptyenvironmentNameis empty- API Proxy name does not exist in the project
- Environment name does not exist, or the user does not have access to it
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
cURL Example
curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/petstore-api/environments/production/route-health/" \
-H "Authorization: Bearer YOUR_TOKEN"
Notes and Warnings
- No backend call: This endpoint never calls the real backend. Each worker pod is probed against its own in-memory routing configuration only.
- Deploy SUCCESS is not the same as route active: A successful Deploy API Proxy response does not guarantee the route has been pushed to and loaded by every worker pod yet. Use this endpoint right after deploying to confirm the route is actually serve-able before running a real invocation.
- Partial deploy detection: If some pods have loaded the route and others have not,
routeActiveisfalsefor the aggregate even thoughpodsActiveis greater than zero — check the per-podpodslist to identify which pods are stale. - Zero pods responded: If the environment has no reachable worker pods (or no management API settings configured),
podsRespondedandpodsActiveare both0androuteActiveisfalse. - One hop for the invoke URL:
apinizerRootContextis included so a CI/CD caller can build the full invoke URL (gateway base URL + apinizerRootContext + servedPath) without a second lookup. For a per-environment gateway base URL and full path list across all environments, see Get API Proxy Invoke Info.
Permissions
User must have API_MANAGEMENT + VIEW permission in the project.
Related Documentation
- Get Deploy Status - Check whether the proxy is deployed and its last deploy revision
- Get API Proxy Invoke Info - Build the full gateway invoke URL for the proxy
- Deploy API Proxy - Deploy an API proxy to a specific environment