How to deploy and undeploy a API proxy using the command line.

Not applicable
 
1 3 1,397
3 REPLIES 3

@pratiksha kandpal

Please refer to the section "Deploying API proxies" in this link. It gives complete details about how to deploy and undeploy API proxies using the management APIs.

Regards,

Amar

Dear @pratiksha kandpal ,

We got Node.JS command line tool for apigee called "ApigeeTool-Node" . See commands for them below,

Deploy :

apigeetool deployproxy  -u sdoe@example.com -o sdoe  -e test -n example-proxy -d .

Undeploy :

apigeetool undeploy -u sdoe@example.com -o sdoe  -n example-proxy -e test -D

You can find npm module here & documentation in github for more details. Keep us posted if you have any queries while using same.

Apigee Management API call for Deploying an API Proxy Revision in Apigee X or Hybrid is stated below.

 

curl --request POST \
https://apigee.googleapis.com/v1/organizations/$APIGEE_ORGANIZATION/environments/$APIGEE_ENVIRONMENT/apis/$API_PROXY/revisions/$API_PROXY_REVISION/deployments?key=$API_KEY \
  --header "Authorization: Bearer $(gcloud auth print-access-token)" \
  --header "Accept: application/json" \
  --compressed

 

For more details on Deploying an API Proxy, please check the official documentation.

Apigee Management API call for Undeploying an API Proxy Revision in Apigee X or Hybrid is stated below.

 

curl --request DELETE \
https://apigee.googleapis.com/v1/organizations/$APIGEE_ORGANIZATION/environments/$APIGEE_ENVIRONMENT/apis/$API_PROXY/revisions/$API_PROXY_REVISION/deployments?key=$API_KEY \
  --header "Authorization: Bearer $(gcloud auth print-access-token)" \
  --header "Accept: application/json" \
  --compressed

 

For more details on Undeploying an API Proxy, please check the official documentation.