In one of policy, we have around over 500 revision history, I want to clear all, keeping the latest one.pls advice how could I perform cleanup of it.
The number of policy revisions is controlled by 2 parameters: the max revisions setting (default 20, set in the policyVersioning.maxRevisions cluster property) or by adding a comment to a revision which excludes it from the max revision count. So either you have set your max revisions very high or you have comments added to your revisions causing it to keep all revisions forever. If it is the max revisions settings, be aware that this is a global setting so it will affect the number of revisions on all policies. If you don't want to change the global setting and it's not caused by comments, I think the process Seji described is your only option.
Hope that helps.
I looked into the product documents and the REST Management API document but I couldn't find any features to manipulate the revision history. It seems we have no such feature to clean up the long list of revision history unfortunately.
How about re-creating the policy as a new one?
These steps will be a little complicated when the policy is in a Published service because the properties of the service aren't exported with the policy itself. We need to configure the new service manually same as the old one.
Thanks all for the various suggestions.
Retrieving data ...