Check your API proxy's deployment status using the API

You are currently viewing version 1.7 of the Apigee hybrid documentation.This version is end of life. You should upgrade to a newer version. For more information, seeSupported versions.

This section describes how to check the deployment status of an API proxy using theApigee APIs.

  1. Deploy a test API proxy as explained inCreate and deploy a new API proxy.
  2. Locate the JSON file with the Apigee Organization Admin service account key. This service account and key was created inEnable synchronizer access.
  3. Execute these two commands to get a token:
    exportGOOGLE_APPLICATION_CREDENTIALS=org-admin-service-account-fileexportTOKEN=$(gcloudauthapplication-defaultprint-access-token)

    Whereorg-admin-service-account-file is the path on your system to the service account key you downloaded with theApigee Organization Admin role.

  4. Call the revisions API, with the following parts:
    • Base URL:https://apigee.googleapis.com/v1
    • Endpoint URL:/organizations/my-organization/environments/test/apis/myproxy/revisions/1/deployments
    • Protocol:HTTPS
    • Method:GET
    • Headers:"Authorization: Bearer $TOKEN"

    The following example calls the deployment revisions API with these settings usingcurl:

    curl "https://apigee.googleapis.com/v1/organizations/my-organization/environments/test/apis/myproxy/revisions/1/deployments" \-X GET -H "Authorization: Bearer $TOKEN"

    You should receive a response similar to the following:

    {  "deployments": [    {      "environment": "test",      "apiProxy": "myproxy",      "revision": "1",      "deployStartTime": "1560782439002",      "pods": [        {          "podName": "apigee-runtime-my-organization-test-blue-56b642fv429v",          "appVersion": "self",          "deploymentStatusTime": "1560787671389",          "deploymentStatus": "deployed",          "statusCode": "200",          "statusCodeDetails": "Deployment Success",          "deploymentTime": "1560782471370",          "podStatus": "active",          "podStatusTime": "1560787671389"        },        {          "podName": "apigee-runtime-my-organization-test-blue-564422f7dmwj",          "appVersion": "self",          "deploymentStatusTime": "1560787670121",          "deploymentStatus": "deployed",          "statusCode": "200",          "statusCodeDetails": "Deployment Success",          "deploymentTime": "1560782485204",          "podStatus": "active",          "podStatusTime": "1560787670121"        }      ],      "basePath": "/"    }  ]}

    This example response shows the API proxy's status on 2 pods. The deployment status isdeployed on both pods.

    Your response might show the deployment status of you API proxy on fewer or more pods, depending on your cluster's configuration.

    If you get an empty response or an error, check that:

    • You used the correct base URL. Note that the hybrid base URL is not the same as the Edge API's base URL. Usehttps://apigee.googleapis.com/v1.
    • You used the correct endpoint URL. Note that the revision is "1" and the endpoint is/organizations/my_organization/environments/test/apis/myproxy/revisions/1/deployments. If you specify a revision that doesn't exist, the request results in an empty response like the following:
      { }
    • You have permissions to access the organization that you specify in the request.
    • Your token has not expired. If it has, regenerate a new one as described inObtain an OAuth 2.0 access token.
    • You wrapped the"Authorization: Bearer $TOKEN" header in quotes.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-18 UTC.