Ana içeriğe geç

Delete Global Policy

Endpoint​

DELETE /apiops/projects/{projectName}/globalPolicies/{policyName}/

Authentication​

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request​

Headers​

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters​

ParameterTypeRequiredDescription
projectNamestringYesProject name
policyNamestringYesGlobal policy name (the policy must already exist)

Query Parameters​

None

Response​

Success Response (200 OK)​

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

Response Fields​

FieldTypeDescription
statusstringResponse status: SUCCESS or FAILURE
deploymentResultobjectOutcome wrapper; success is always true on a successful delete
deploymentResult.successbooleantrue 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 Request with a FAILURE status, not 404.
  • Irreversible: There is no soft-delete — recreate the policy with Create Global Policy if needed.
  • Permission: Requires API_MANAGEMENT + MANAGE in the project.