Was this helpful?

 

API Platform Base Path: https://api.enterprise.apigee.com/v1/o/{org_name}

API Resource Path: /apis/{api_name}/deployments?action=undeploy&env={environment_name}&revision={revision_number}

Removes an API from an environment (typically 'test' or 'prod')

Verb: POST

Auth: Basic Auth

 

Undeploy removes a revision of an API from the named environment. This is often done before an API is deleted (an API cannot be deleted while it is deployed in an environment). Note that you pass the environment name and API revision number as parameters to the method.

Sample Request:
$ curl -X POST \ https://api.enterprise.apigee.com/v1/o/{org_name}/apis/{api_name}/deployments?"action=undeploy&env={env_name}&revision={revision_number}" \ -u myname:mypass
Sample Response:
{
  "aPIProxy" : "myapi",
  "configuration" : {
    "basePath" : "/",
    "steps" : [ ]
  },
  "environment" : "test",
  "name" : "1",
  "organization" : "myorg",
  "revision" : "1",
  "server" : [ {
    "status" : "undeployed",
    "type" : [ "message-processor" ],
    "uUID" : "90096dd1-1019-406b-9f42-fbb80cd01200"
  }, {
    "status" : "undeployed",
    "type" : [ "message-processor" ],
    "uUID" : "7d6e2eb1-581a-4db0-8045-20d9c3306549"
  }, {
    "status" : "undeployed",
    "type" : [ "router" ],
    "uUID" : "1619e2d7-c822-45e0-9f97-63882fb6a805"
  }, {
    "status" : "undeployed",
    "type" : [ "router" ],
    "uUID" : "8a5f3d5f-46f8-4e99-b4cc-955875c8a8c8"
  } ],
  "state" : "undeployed"
}
Response Payload Elements:
 
 
Name Description
aPIProxy The name of the API
configuration Base path and policy steps that are configured for the deployment
environment The environment where the APi was deployed
name The name of the APi revision
organization The organization of the API provider
revision The revision number of the APi proxy
server Information on Apigee servers deployed to service the API
state The state of the API: deployed or undeployed
Errors
{
  "code" : "messaging.config.beans.ApplicationDoesNotExist",
  "message" : "APIProxy named myapi does not exist in organization myorg",
  "contexts" : [ ]
}

 

Add new comment

Provide your email address if you wish to be contacted offline about your comment.
We will not display your email address as part of your comment.

We'd love your feedback and perspective! Please be as specific as possible.
Type the characters you see in this picture. (verify using audio)

Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.