Delete Global Policy
Endpoint
DELETE /apiops/projects/{projectName}/globalPolicies/{policyName}/
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 |
| policyName | string | Yes | Global policy name (the policy 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 | Outcome wrapper; success is always true on a successful delete |
| deploymentResult.success | boolean | true when the policy was removed |
Error Response (400 Bad Request)
{
"status": "FAILURE",
"resultMessage": "Global policy (name: backend-ws-security) 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/globalPolicies/backend-ws-security/" \
-H "Authorization: Bearer YOUR_TOKEN"
Notes and Warnings
- Cascade-Detach, Not an In-Use Guard: A global policy that is still embedded in one or more API proxies, API proxy groups or policy groups is deleted anyway. Its embedded copy is stripped out of every place that references it (by id) before the standalone record is removed — there is no "still referenced" error.
- No Standalone Undeploy Step: Unlike a policy group, a plain global policy is never independently deployed to gateway workers — it only takes effect embedded inside a proxy or proxy group. Deleting it therefore does not undeploy anything by itself; the cascade update to each embedder is what takes it out of the running configuration on their next redeploy.
- Not Found: Deleting a policy that does not exist returns a
400 Bad Requestwith aFAILUREstatus, not404. - Irreversible: There is no soft-delete — recreate the policy with Create Global Policy if needed.
- Permission: Requires
API_MANAGEMENT+MANAGEin the project.
Related Documentation
- Get Global Policy - Inspect a policy before deleting
- List Global Policies - List all global policies in a project
- Global Policies API - Resource overview
- Authentication Guide - How to obtain and use API tokens
- Error Handling - Error response formats