How to override default behaviour of importing API Proxy's revision automatically incremented every time

Hi

It's written in APIGEE Documentation

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

The API proxyrevision is merely an incremented number associated with an API proxy configuration. API Services maintains revisions of your configurations so that you can revert a configuration when something goes wrong. By default, an API proxy's revision is automatically incremented every time you deploy an API proxy. This behavior can be overridden in the management UI and in the API.

I want to change this default behaviour where API Proxy revision is automatically incremented every time when we call Import API Proxy Rest Management API. I don't want to increment the API Proxy revision every time.

How we can do that ?

Thanks

0 7 890
7 REPLIES 7

Not applicable

Hi @Guarav,

I understand that you want to avoid increasing revisions numbers of an API proxy. I guess, you want to have this behaviour only for dev or test environments and, definitely, not for production. is this correct guess?

Also, could you specify the complete management API used for deploying the proxy?

Thanks, Rajesh Doda

Hi @rdoda

Yeah you are correct.

I am using below rest management API for import and deploy API Proxy

Import API Proxy

http://docs.apigee.com/management/apis/post/organizations/%7Borg_name%7D/apis-0

Deploy API Proxy

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

Basically while importing (first call above) there are new revisions getting created for same API Proxy, I want to restrict to only one revision and the same getting deployed every time.

Thanks

@GAURAV - If you don't want to have the revision number to increment, you can use the direct deploy API and pass the revision number, it will update the bundle running on that revision. Use the delay/override params for seamless deployments as mentioned in the documentation.

If you use Maven, you can use the deploy plugin as well --> apigee-deploy-maven-plugin. This has these capabilities built in. Please check the Github README doc for more info

It will save you time by running the bundle validations, compressing it to a zip and deploying it (as new, or existing irrespective of the bundle deployed or not)

@Sai Saran Vaidyanathan ,the question is about restricting revision increase at the time of importing a proxy ,not deploying it ,override ,delay come into picture for deploying a proxy .Could you redirect me to a thread where at import time itself i get a handle of incrementing the revision .

regards

Arpit

Not applicable

Hi @Guarav,

Import management API is mainly for importing the new bundle to Organization. It increments the revision to ensure that earlier bundle is available even after importing a new revision. I don't think there is any option to specify the revision number for "import" management API.

For your use case, "Update API Proxy Revision" management API would be a better option. Detail is:

http://docs.apigee.com/management/apis/post/organizations/%7Borg_name%7D/apis/%7Bapi_name%7D/revisio...

Let me know how it goes.

Cheers,

Rajesh

Not applicable

Hi @Guarav. Your question has already been answered iin this thread. Please take a look at it.

https://community.apigee.com/questions/4733/api-proxies-deployment-revisions-in-test-and-prod.html

Just an FYI that the doc topic now has a link to the update API proxy API, along with a Maven note/link saying to use "update" or "clean" to keep the same revision.