Ana içeriğe geç

Get Deploy Status

Endpoint

GET /apiops/projects/{projectName}/apiProxies/{apiProxyName}/environments/{environmentName}/deploy-status/

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
apiProxyNamestringYesAPI Proxy name (must exist)
environmentNamestringYesEnvironment name (must exist)

Query Parameters

None.

Request Body

This endpoint does not require a request body.

Response

Success Response (200 OK)

{
"status": "SUCCESS",
"resultList": [
{
"deployed": true,
"lastDeployTime": "2026-07-01T10:00:00Z",
"revision": 12,
"redeployRequired": false
}
],
"resultCount": 1
}

Response Fields

FieldTypeDescription
statusstringRequest status (SUCCESS or FAILURE)
resultListarraySingle-element array with the deploy status record
resultList[].deployedbooleantrue if the API proxy is currently deployed in the given environment
resultList[].lastDeployTimestringISO 8601 timestamp of the most recent successful deploy; null if the proxy was never deployed to this environment
resultList[].revisionintegerRevision number of the most recent successful deploy; null if never deployed
resultList[].redeployRequiredbooleantrue if the API proxy was modified after the last deploy and needs to be redeployed
resultCountintegerAlways 1

Error Response (400 Bad Request)

{
"status": "FAILURE",
"resultMessage": "ApiProxy with name (petstore-api) is not found!"
}

Common Causes

  • apiProxyName is empty
  • environmentName is 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/deploy-status/" \
-H "Authorization: Bearer YOUR_TOKEN"

Notes and Warnings

  • Idempotent / read-only: This endpoint performs no side effects — it only reads the API proxy's deploy list and deploy history. Safe to call repeatedly in CI/CD preflight or E2E test setup.
  • Never deployed: If the API proxy was never deployed to the given environment, deployed is false and revision/lastDeployTime are null.
  • Redeploy detection: redeployRequired reflects whether the API proxy definition changed after the last deploy to this environment — use it to decide whether a fresh Deploy API Proxy call is needed before running tests.
  • Deploy vs. route active: A deployed: true result means the manager considers the proxy deployed to the environment — it does not guarantee the route is actually live on every worker pod. Use Get Worker Route Health to verify the route is actually serve-able.

Permissions

User must have API_MANAGEMENT + VIEW permission in the project.