Our APIGW we've lots of API's and every change we made to an API generates a version in the revision history.
We've located that every version in the revision history is being kept inside the table "policy_version" of the apigateway database
If we analize the space spent by every table in thes database we can se that the policy_version table is very big.
We need a procedure to maintain, for example the last 6 version in the revision history and obviously without destroying the actual version that is in use .
There is a setting in the gateway CWP properties to set the max revisions to keep .
https://techdocs.broadcom.com/us/en/ca-enterprise-software/layer7-api-management/api-gateway/11-1/services-and-policies/working-with-policies/policy-revisions.html
The number of versions that are stored is controlled by the policyVersioning.maxRevisions cluster property. By default, 20 "uncommented" versions are stored.
If there is a comment added to the policy version it is not counted and will be kept forever.
This revision history is maintained when a policy is updated .