How to bulk delete older revisions of an API Proxy

We have been working on a long running API program and the API currently is in a very high revision number.

We would like to clean it up by deleting all but (say) the recent 10 revisions.

Since we have 100s of revisions, we'd like to do it in a safe yet fast way, rather than going to each revision and doing a delete current revision.

Is there a better (automated) way to do this cleanup?

0 2 749
2 REPLIES 2

I would say using the grunt plugin might be quite easy : https://github.com/apigeecs/apigee-deploy-grunt-plugin

Call first the getAllApiRevisions task and then write a small code to iterate through it and invoke deleteApiRevision task.