This page applies to Apigee and Apigee hybrid.
View Apigee Edge documentation.
Undeploy an API proxy revision from your cluster as described in the following sections.
Note that when you undeploy a revision:
- Apigee does not roll the revision back to the previously deployed revision.
- After undeploying, no revisions of the API proxy are deployed in the environment.
Undeploying an API proxy is similar to deleting an API proxy, except that when you undeploy a revision you can choose to edit it in the UI and later re-deploy it. If you delete the API proxy, it is no longer available to edit.
New Proxy Editor
To undeploy an API proxy using the UI:
If you are using the Apigee UI in Cloud console: Select Proxy development > API Proxies.
If you are using the classic Apigee UI: Select Develop > API Proxies and in the Proxies pane, select the environment for the proxy.
Select the API proxy that you want to undeploy. The UI displays the API proxy's Overview view.
- Hover the cursor over the icon in the Status column and select Undeploy:
Classic Proxy Editor
To undeploy an API proxy using the UI:
- Sign in to the Apigee UI.
- Select Develop > API Proxies.
The UI displays a list of current API proxies for the selected environment:
Select the API proxy that you want to undeploy.
The UI displays the API proxy's Overview view.
- In the desired environment row, expand the Revision drop-down list and
select Undeploy:
The UI prompts you to confirm the version you want to undeploy:
- Click Undeploy.
The UI updates the status to show that the revision was undeployed from the cluster immediately:
Note, though, that the undeployment process can take some time (in the eventually consistent model). In fact, when you click Undeploy, Apigee begins the process of undeploying the selected revision from that environment in the cluster.
For information on how to check the status of the undeployed proxy, see Viewing deployment status.
Alternatively, you can undeploy the current revision that you are editing in the Develop tab:
- Click the Deploy to: env_name drop-down list:
The UI displays a list of environments. In the Revision column, the UI lists the currently deployed revision (or &emdash; if none), and prompts you with Deploy revision and Undeploy buttons.
- Click the Undeploy button for the desired environment.
The UI prompts you to confirm the version you want to undeploy:
- Click the Undeploy button.
The UI updates the status to show that the revision was undeployed immediately. However, the undeployment process can take some time (in the eventually consistent model). When you click Undeploy, Apigee begins the process of undeploying the selected revision from that environment.
Apigee API
To undeploy an API proxy, use the following API call:
curl "https://apigee.googleapis.com/v1/organizations/$ORG/environments/$ENV/apis/$API/revisions/$REV/deployments" \ -X DELETE \ -H "Authorization: Bearer $TOKEN"
Where $TOKEN
is set to your OAuth 2.0 access token, as described in
Obtaining an OAuth 2.0 access token. For information about the curl
options used in this example, see
Using curl. For a description of the environment variables used,
see Setting environment variables for Apigee API requests.
The following provides an example of the response output (an empty response):
{}
For more information, see the Undeploy API proxy revision API.
gcloud
The following sections provide examples of using gcloud alpha apigee
CLI commands to
undeploy API proxy revisions and validate the undeployment.
- Undeploying an API proxy revision using the gcloud CLI
- Validating the undeployment of an API proxy revision using the gcloud CLI
For more information and a description of the environment variables used in the examples, see Getting started using gcloud with Apigee.
Undeploying an API proxy revision using the gcloud CLI
To undeploy an API proxy revision, use the following gcloud command:
gcloud alpha apigee apis undeploy $REV --api=$API --environment=$ENV
The following provides an example of the response:
Using Apigee organization `my-org`
Validating the undeployment of an API proxy revision using the gcloud CLI
To validate that the API proxy revision has been undeployed from the environment, use the following gcloud command:
gcloud alpha apigee deployments list --api=$API --environment=$ENV
The following provides an example of the response:
Using Apigee organization `my-org` Listed 0 items.
For more information, see List deployments CLI.