[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eThis documentation version (1.3) is end-of-life and users are advised to upgrade to a newer version.\u003c/p\u003e\n"],["\u003cp\u003eYou can check the deployment status of an API proxy by using the Apigee APIs and following the instructions to deploy a test API proxy.\u003c/p\u003e\n"],["\u003cp\u003eYou need to locate the JSON file for the Apigee Organization Admin service account key, and use it along with provided commands to obtain a token.\u003c/p\u003e\n"],["\u003cp\u003eUsing the token and a \u003ccode\u003eGET\u003c/code\u003e method, you can call the revisions API with the provided base and endpoint URLs, along with specific headers, to check for a successful deployment of an API Proxy.\u003c/p\u003e\n"],["\u003cp\u003eIf an error or an empty response occurs, you should review your base and endpoint URLs, permissions, token validity, and header formatting, as described in the document.\u003c/p\u003e\n"]]],[],null,["# Check your API proxy's deployment status using the API\n\n| You are currently viewing version 1.3 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n\nThis section describes how to check the deployment status of an API proxy using the [Apigee APIs](/apigee/docs/reference/apis/apigee/rest).\n\n1. Deploy a test API proxy as explained in [Create and deploy a new API proxy](/apigee/docs/hybrid/v1.3/test-new-proxy).\n2. Locate the JSON file with the Apigee Organization Admin service account key. This service account and key was created in [Enable synchronizer access](/apigee/docs/hybrid/v1.3/install-apply-hybrid#enable-synchronizer-access).\n3. Execute these two commands to get a token: \n\n export GOOGLE_APPLICATION_CREDENTIALS=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eorg\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e-\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003eadmin\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e-\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003eservice\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e-\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003eaccount\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e-\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003efile\u003c/span\u003e\u003c/var\u003e\n export TOKEN=$(gcloud auth application-default print-access-token)\n\n\n Where \u003cvar translate=\"no\"\u003eorg-admin-service-account-file\u003c/var\u003e is the path on your system to the service\n account key you downloaded with the **Apigee Organization Admin** role.\n4. Call the revisions API, with the following parts:\n - **Base URL:** `https://apigee.googleapis.com/v1`\n - **Endpoint URL:** `/organizations/my-organization/environments/test/apis/myproxy/revisions/1/deployments`\n - **Protocol:** `HTTPS`\n - **Method:** `GET`\n - **Headers:** `\"Authorization: Bearer $TOKEN\"`\n\n The following example calls the deployment revisions API with these settings using\n `curl`: \n\n ```\n curl \"https://apigee.googleapis.com/v1/organizations/my-organization/environments/test/apis/myproxy/revisions/1/deployments\" \\\n -X GET -H \"Authorization: Bearer $TOKEN\"\n ```\n\n You should receive a response similar to the following: \n\n ```\n {\n \"environment\": \"test\",\n \"apiProxy\": \"myproxy\",\n \"revision\": \"1\",\n \"deployStartTime\": \"1616787712821\",\n \"state\": \"READY\",\n \"instances\": [\n {\n \"instance\": \"hybrid-docs-id\",\n \"deployedRevisions\": [\n {\n \"revision\": \"2\",\n \"percentage\": 100\n }\n ],\n \"deployedRoutes\": [\n {\n \"basepath\": \"/myproxy\",\n \"envgroup\": \"test-group\",\n \"environment\": \"test\",\n \"percentage\": 100\n }\n ]\n }\n ]\n }\n ```\n\n This example response shows the API proxy's status is `READY`, indicating\n a successful deployment.\n\n If you get an empty response or an error, check that:\n - You used the correct base URL. Note that the hybrid base URL is not the same as the Edge API's base URL. Use `https://apigee.googleapis.com/v1`.\n - 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: \n\n ```\n { }\n ```\n - You have permissions to access the organization that you specify in the request.\n - Your token has not expired. If it has, regenerate a new one as described in [Obtain an OAuth 2.0 access token](/apigee/docs/api-platform/get-started/api-get-started#oauth20).\n - You wrapped the `\"Authorization: Bearer $TOKEN\"` header in quotes."]]