Hi
How can I deploy the latest imported revision without knowing/undeploying the current deployed version?
Do we need to always undeploy the deployed version and then deploy the latest imported version?
Is there a management API, which can directly deploy the latest imported version without need of two steps , first to undeploy the deployed version and second to deploy the latest imported revision?
I tried using below API with query parameter delay=2 and override=true but it didn't work.
Thanks
Solved! Go to Solution.
Yes, the API call you referenced is the one you want. It works.
Try a longer delay. 2 seconds is not long enough. It will take longer than that to deploy a revision.
The call looks like this:
POST \ -H "content-type : application/x-www-form-urlencoded" \ "${mgmtserver} /v1 /o /${org} /e /${environment} /apis /${proxyname} /revisions /${rev} /deployments" \ -d 'override=true&delay=60'
(Collapse spaces as necessary. If I leave them in then the formatted code is not rendered here. Blasted forum.)
Yes, the API call you referenced is the one you want. It works.
Try a longer delay. 2 seconds is not long enough. It will take longer than that to deploy a revision.
The call looks like this:
POST \ -H "content-type : application/x-www-form-urlencoded" \ "${mgmtserver} /v1 /o /${org} /e /${environment} /apis /${proxyname} /revisions /${rev} /deployments" \ -d 'override=true&delay=60'
(Collapse spaces as necessary. If I leave them in then the formatted code is not rendered here. Blasted forum.)
I think you missed to specify the call.
Also as per documentation below, only override=true should work but in this case it's not working. Also I increased delay to 60 still it didn't work.
https://docs.apigee.com/api-platform/deploy/deploy-api-proxies-using-management-api#seamless
Thanks for the hint. Formatting of code on this forum magically disappeared the call.
I'm sorry it's still not working for you. It actually works, I promise.
What do you mean by "it didn't work"? How are you evaluating whether "it worked" or not?
What did you observe to allow you to conclude, "it didn't work"?
It actually works as advertised. I guess there is a possibility of a rare bug, but i think it's more likely that if you think "it didn't work" then probably:
Sorry for the late response.
It didn't work mean that api proxy is not deployed and it gave the error related to conflict that revision is already deployed.
Ah, well....to avoid that, you will need to check for the deployment status of the latest revision before trying to deploy it.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |