Delete Policy Group
Endpoint
DELETE /apiops/projects/{projectName}/policyGroups/{policyGroupName}/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| policyGroupName | string | Yes | Policy group name (the group must already exist) |
Query Parameters
None
Response
Success Response (200 OK)
{
"status": "SUCCESS",
"deploymentResult": {
"success": true
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
| status | string | Response status: SUCCESS or FAILURE |
| deploymentResult | object | Undeployment outcome. success is false (with resultMessage set) if undeploying from any running environment failed |
| deploymentResult.success | boolean | true when the group was undeployed everywhere and removed |
If the group was deployed to running environments, deploymentResult may also include a per-environment
detailList describing each environment's undeploy outcome.
Error Response (400 Bad Request)
{
"status": "FAILURE",
"resultMessage": "Policy group (name: standard-security-bundle) was not found!"
}
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
cURL Example
curl -X DELETE \
"https://demo.apinizer.com/apiops/projects/MyProject/policyGroups/standard-security-bundle/" \
-H "Authorization: Bearer YOUR_TOKEN"
Notes and Warnings
- Undeploy, Cascade-Detach, Then Remove: The group is first undeployed from every running environment it is deployed to, then stripped out of every API proxy and API proxy group that embeds it (by id), and only then is the standalone record removed.
- Cascade-Detach, Not an In-Use Guard: A policy group that is still embedded in one or more API proxies or API proxy groups is deleted anyway — there is no "still referenced" error.
- Not Found: Deleting a group that does not exist returns a
400 Bad Requestwith aFAILUREstatus, not404. - Irreversible: There is no soft-delete — recreate the group with Create Policy Group if needed.
- Permission: Requires
API_MANAGEMENT+MANAGEin the project.
Related Documentation
- Get Policy Group - Inspect a policy group before deleting
- List Policy Groups - List all policy groups in a project
- Policy Groups API - Resource overview
- Authentication Guide - How to obtain and use API tokens
- Error Handling - Error response formats