Hi,
In my organization few proxies are having more than 100 revisions in which only 5 are active. I am looking for best options to delete 95 revisions in a proxy. can some one please suggest.
thanks,
Satish
Solved! Go to Solution.
Here's a new answer to an old question.
To delete multiple older revisions of an API proxy, you can use the nodejs script cleanOldRevisions.js.
Usage: node cleanOldRevisions.js [OPTION] Options: -M, --mgmtserver=ARG the base path, including optional port, of the Edge mgmt server. Defaults to https://api.enterprise.apigee.com . -u, --username=ARG org user with permissions to read Edge configuration. -p, --password=ARG password for the org user. -n, --netrc retrieve the username + password from the .netrc file. In lieu of -u/-p -o, --org=ARG the Edge organization. -v, --verbose -h, --help -R, --regexp=ARG Optional. Limit the culling to proxies with names matching this regexp. -K, --numToKeep=ARG Required. Max number of revisions of each proxy to retain.
If you want to keep the most recent 5 revisions of *all* API Proxies in an organization, then you would use this:
./cleanOldRevisions.js -o $ORG -v -K 5
If you want to keep 3 revisions of Proxies matching a specific regexp, you can do this:
./cleanOldRevisions.js -o $ORG -v -K 3 -R "^Catalog.*"