Deployment error

Not applicable

Hi, I'm trying to deploy "apiproxy-kvmap" proxy in my org and attached the same. It's giving deployment error as 400 but it's imported into org but it's not deployed into specific org. Why do I got this error?

What is the curl script only to deploy the existing revision in to prod from test? (I don't want to import the apiproxy again into prod and only want to deploy the existing revision into prod.) Please advice.

Error log:

Deploying to prod on https://api.enterprise.apigee.com using xxxxxxxxxxxxxxxxxx and XXXXXXXXX Writing ../apiproxy-kvmap\deploy.sh to .\deploy.sh Writing ../apiproxy-kvmap\apiproxy\apiproxy-kvmap.xml to apiproxy\apiproxy-kvmap .xml Writing ../apiproxy-kvmap\apiproxy\policies\getUrl.xml to apiproxy\policies\getU rl.xml Writing ../apiproxy-kvmap\apiproxy\policies\putUrl.xml to apiproxy\policies\putU rl.xml Writing ../apiproxy-kvmap\apiproxy\policies\Raise-Fault-1.xml to apiproxy\polici es\Raise-Fault-1.xml Writing ../apiproxy-kvmap\apiproxy\proxies\default.xml to apiproxy\proxies\defau lt.xml Writing ../apiproxy-kvmap\apiproxy\targets\default.xml to apiproxy\targets\defau lt.xml Imported new proxy version 4 Deploy failed with status 400: If 'State: deployed', then your API Proxy is ready to be invoked.

0 5 1,324
5 REPLIES 5

Try this,

curl -X POST -H "Content-type:application/x-www-form-urlencoded" \
https://api.enterprise.apigee.com/v1/o/{org_name}/environments/{env-name}/apis/{api_name}/revisions/... \
-u myname:mypass

you can find more information here,

http://apigee.com/docs/api-services/content/deploy-api-proxies-using-management-api

Not applicable

@mukundha@apigee.com Thanks Mukundha for your quick response.

I have tried this command but getting the below error. It seems, it's not un-deploying the existing revision in prod. What is the curl script to un-deploy the existing revision and deploy the new revision from test? In the above curl command we are defining revision number explicitly. Instead of that, Is there any way that it can take the latest revision from test and deploy it in prod after un-deploying the existing revision in prod?

Error:

Deploying to prod on https://api.enterprise.apigee.com using xxxxxxxxxxxxx and xxxxxxxxxxx { "code" : "distribution.DeploymentPathConflict", "message" : "Path /keyvaluemap conflicts with existing deployment path for rev ision 1 of the APIProxy apiproxy-kvmap in organization xxxxxxxxxxxxx", "contexts" : [ ] }If 'State: deployed', then your API Proxy is ready to be invoked.

Not applicable

@mukundha@apigee.com. Thank you.

Is revision number is mandatory if we are using curl for deployment? Please confirm.

Any idea why my attached deployment script is giving 400 status code even through it's importing into my org. Is it because not able to deploy it? Please verify it and let me know what was is the mistake in the script.

Thanks for your great support!

ok, I dont see your script. But from the error it looks like deployment has failed - most probably because of conflicting path of a previous version.

To avoid this error, always use override, so it will undeploy any other revisions and deploy the current revision in the URL