Was this helpful?

 

Apigee Edge Base Path: https://api.enterprise.apigee.com/v1/o/{org_name}

API Resource Path:

/environments/{env_name}/apis/{api_name}/revisions/{revision_number}/deployments

Description: Deploys an API proxy to an environment (typically 'test' or 'prod') in an Apigee Edge organization.

Verb: POST
Auth: Basic Auth
Media types:
application/x-www-url-form-encoded

 

Overview:

This call deploys a specific revision of an API proxy to the specified environment.

By default every organization on Apigee Edge is provisioned with two environments--test and prod.

Each environment has a unique network address. To get a list of available environments in your organization, use the GET organization method to list environments.

API proxies cannot be invoked until they have been deployed to an environment.

Apigee provides a deployment tool and sample scripts on GitHub.

Sample Request:
$ curl -X POST -H "Content-type:x-www-form-urlencoded" \
https://api.enterprise.apigee.com/v1/o/{org_name}/environments/{env_name}/apis/{api_name}/revisions/{revision_number}/deployments?"basepath=/" \
-u myname:mypass 
Query Parameters:
Name Description Default Required?
env The name of the environment to which the revision of the API proxy should be deployed. (Usually 'test' or 'prod'.) N/A Yes
basepath This setting adds an additional 'deployment basepath' to the basepath configured in the API proxy definition. To leave the basepath unmodified (that is, to use only the proxy basepath) , use the empty value '/'. N/A Yes
action The action to be taken against the specified revision of the API proxy. Supported values are 'deploy' and 'undeploy' N/A Yes
delay Enforces a delay, measured in seconds, before the currently deployed API proxy revision is undeployed and replaced by the new revision that is being deployed. Use this setting to minimize the impact of deployment on in-flight transactions. 0 No
override When set to 'true', forces deployment of the new revision by overriding conflict checks between revisions. Set this parameter to 'true' when using the 'delay parameter' to minimize impact on in-flight transaction during deployment. false No
Sample Response:
{
  "aPIProxy" : "weatherapi",
  "configuration" : {
    "basePath" : "/",
    "steps" : [ ]
  },
  "environment" : "prod",
  "name" : "64",
  "organization" : "apifactory",
  "revision" : "64",
  "server" : [ {
    "status" : "deployed",
    "type" : [ "message-processor" ],
    "uUID" : "3a9f88bb-b485-47bb-a072-92dbefe8bc14"
  }, {
    "status" : "deployed",
    "type" : [ "message-processor" ],
    "uUID" : "8a4549fe-ceff-44cf-967f-ab4a500a0479"
  }, {
    "status" : "deployed",
    "type" : [ "router" ],
    "uUID" : "3341eda0-fa82-4dcb-bbf1-5cf77dc03efc"
  }, {
    "status" : "deployed",
    "type" : [ "router" ],
    "uUID" : "c0b782f2-ccb6-4984-a0c0-0ac1db60a039"
  }, {
    "status" : "deployed",
    "type" : [ "router" ],
    "uUID" : "38f80c53-a22b-4427-ab95-a178482daa6b"
  }, {
    "status" : "deployed",
    "type" : [ "router" ],
    "uUID" : "28d847a2-5bfd-404d-985d-33d079d691d9"
  }, {
    "status" : "deployed",
    "type" : [ "router" ],
    "uUID" : "26467f86-e529-4135-b012-120e274755d3"
  }, {
    "status" : "deployed",
    "type" : [ "router" ],
    "uUID" : "807be0c7-dcc7-4be4-9d1e-30d26fa5519c"
  } ],
  "state" : "deployed"
Response Payload Elements:
Name Description
aPIProxy The name of the API proxy
configuration The basepath for this deployment (appended to the basepath defined in the Proxy Endpoint if any)
steps Any policy steps attached to the API proxy
environment The environment where the API proxy is deployed ('test' or 'prod')
name The revision name (always a number)
organization The API provider's Apigee organization name
revision The number of the revision
server A set of servers deployed in support of the API proxy (primarily for Apigee support)
state The state of the API proxy, either 'deployed' or 'undeployed'
Errors
{
  "code" : "distribution.DeploymentPathConflict",
  "message" : "Path /weather conflicts with existing deployment path for revision 64 of the APIProxy weatherapi in organization apifactory",
  "contexts" : [ ]
}


{
  "code" : "distribution.RevisionNotDeployed",
  "message" : "Revision 65 of APIProxy weatherapi is not deployed to the environment prod in the organization apifactory",
  "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.