Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

deploy api proxy thru curl is not working.

Not applicable

Hi,

I am able to deploy proxy thru this url

http://apigee.com/docs/management/apis/post/organizations/%7Borg_name%7D/environments/%7Benv_name%7D...

where as when I tired the same thru curl cmd on my linux machine is not working. here is the curl cmd I used

curl -X POST -u davana.gongadi@abc.com:xxxx https://api.enterprise.apigee.com/v1/organizations/gd_satish/environments/test/pis/weatherapi/revisi...

output of the curl cmd is:

{ "code" : "distribution.DeploymentPathConflict", "message" : "Path /v0/weather conflicts with existing deployment path for revision 4 of the APIProxy weatherapi in organization gd_satish", "contexts" : [ ] }

what did I miss in curl cmd? Can someone please suggest me.

thanks,

Davana

Solved Solved
0 3 899
2 ACCEPTED SOLUTIONS

To override, you need to pass the Content-Type header along with your curl - this will undeploy the previous revision and deploy the current revision

try this,

curl -X POST -u davana.gongadi@abc.com:xxxx https://api.enterprise.apigee.com/v1/organizations/gd_satish/environments/test/pis/weatherapi/revisi... -H 'Content-Type: application/x-www-form-urlencoded'

Thanks

View solution in original post

Not applicable

thanks for quick response Mukundha!.

Passing content-type header worked but we should pass -H next to post instead of at the end.

this curl cmd worked..

curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -u davana.gongadi@abc.com:xxxx https://api.enterprise.apigee.com/v1/organizations/gd_satish/environments/test/apis/weatherapi/revis...

Thanks.

View solution in original post

3 REPLIES 3
Top Solution Authors