Editing and deleting policy templates
After template creation, the platform supports editing policy rules, execution timing, and descriptions, as well as deleting templates entirely. Both edit and delete actions reside within each template's entry row in the Policy Templates list.
Editing a policy template
Opening a template for editing pre-populates the interface with its currently attached policy rules and their saved execution timing, so you can update the description, policy rule selection, rule ordering, or execution timing in isolation, without disrupting unaffected settings. The template name remains immutable after initial creation. The name field appears on the edit interface, but it is not editable.
Saving an edit triggers automatic versioning depending on the template's attachment state and the type of change made. If the template is already attached to at least one API, adding a rule, removing a rule, updating a rule's execution timing, or reordering rules creates a new version. If you make any of these changes, including reordering the policies, while the template is not yet attached to any API, or if you only change the description, the existing version is updated in place instead. The Gateway executes versioning saves directly, displaying a notification containing the new version number upon completion. By default, when the Gateway creates a new template version, the earlier template version and the APIs already attached to it remain unaffected.
Prerequisites
- An existing policy template.
- The API Management - APIs privilege, included in the API Manager and API Administrator roles. Refer to API Management Roles and Privileges.
To edit a policy template:
- Go to Configure APIs and Applications > Manage APIs, select the Policy Templates tab, and locate the template you want to edit.
- From the template's row, open the Actions menu and select Edit.
- Update the template. The template's currently attached rules and their execution timing load pre-selected, so you only need to touch what you want to change.
- Click Attach to commit your changes. This button stays disabled until you make a change to the template.
You can also edit a policy template programmatically using the apiPolicyTemplateUpdate mutation.
Deleting a policy template
Template deletion rules protect active API deployments from accidental disruption. If one or more APIs currently reference a template, the Gateway blocks deletion and displays a list of the dependent APIs, requiring template detachment prior to deletion.
Deletion operates on a per-version basis, allowing the removal of older, unused versions while newer versions remain active elsewhere. Deletion always targets the specific version you select from the Policy Templates list, since each version appears as its own row with its own Delete action. Deleting a template permanently removes the template structure without deleting its underlying policy rules, which remain available for other templates or direct API assignments.
Prerequisites
- The API Management - APIs privilege, included in the API Manager and API Administrator roles. Refer to API Management Roles and Privileges.
To delete a policy template:
- Go to Configure APIs and Applications > Manage APIs, select the Policy Templates tab, and locate the template you want to delete.
- From the template's row, open the Actions menu and select Delete.
- Confirm the deletion in the dialog that appears. Canceling keeps the template.
You can also delete a policy template programmatically using the apiPolicyTemplateDelete mutation.