Ana içeriğe geç

Delete Policy Group

Endpoint

DELETE /apiops/projects/{projectName}/policyGroups/{policyGroupName}/

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
policyGroupNamestringYesPolicy group name (the group must already exist)

Query Parameters

None

Response

Success Response (200 OK)

{
"status": "SUCCESS",
"deploymentResult": {
"success": true
}
}

Response Fields

FieldTypeDescription
statusstringResponse status: SUCCESS or FAILURE
deploymentResultobjectUndeployment outcome. success is false (with resultMessage set) if undeploying from any running environment failed
deploymentResult.successbooleantrue 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 Request with a FAILURE status, not 404.
  • Irreversible: There is no soft-delete — recreate the group with Create Policy Group if needed.
  • Permission: Requires API_MANAGEMENT + MANAGE in the project.