apiPolicyTemplateDelete
Deletes a policy template. Input Parameters:
id: Stable identifier of the policy template to delete.version: Optional version of the policy template. If not provided or null, the latest version is deleted. Response:- Returns the deleted DeployedApiPolicyTemplate object upon successful deletion.
- If the template is in use, returns a
TEMPLATE_IN_USEerror. The IDs of the deployments using the template are returned in the extensionsparametersfield. Example Request:
mutation {
apiPolicyTemplateDelete(id: "<xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx>", version: 1) {
id,
version
}
}
Example error response when template is in use:
{
"errors": [
{
"message": "This API policy template cannot be deleted as it is being used by one or more API deployments.",
"path": [
"apiPolicyTemplateDelete"
],
"extensions": {
"errorCode": "TEMPLATE_IN_USE",
"parameters": [
"b776fb1e-a25d-056f-3414-f4162273d058"
],
"language": "en-US",
"classification": "DataFetchingException"
}
}
],
"data": null
}
apiPolicyTemplateDelete(
id: ID!
version: Int
): DeployedApiPolicyTemplate!
Arguments
apiPolicyTemplateDelete.id ● ID! non-null scalar miscellaneous {#id}
apiPolicyTemplateDelete.version ● Int scalar miscellaneous {#version}
Type
DeployedApiPolicyTemplate object platform
Represents a reusable policy template that can be applied to multiple API deployments.
Was this topic helpful?