Delete Policy
Endpoint
DELETE /apiops/projects/{projectName}/apiProxies/{apiProxyName}/policies/{policyName}/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
| Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
| policyName | string | Yes | Policy name (must exist) |
Request Body
Full JSON Body Example
{
"operationMetadata": {
"targetScope": "ALL",
"targetPipeline": "REQUEST",
"deploy": true,
"deployTargetEnvironmentNameList": ["production"]
}
}
Request Body Fields
operationMetadata
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| targetScope | string | Yes | - | Policy scope: ALL or ENDPOINT |
| targetEndpoint | string | No* | - | Endpoint path (required if targetScope=ENDPOINT) |
| targetEndpointHTTPMethod | string | No* | - | HTTP method (required if targetScope=ENDPOINT) |
| targetPipeline | string | Yes | - | Pipeline: REQUEST, RESPONSE, or ERROR |
| deploy | boolean | No | true | Whether to deploy after deleting policy |
| deployTargetEnvironmentNameList | array | No | [] | List of environment names to deploy to |
Note: The order field is not used for delete operations.
EnumPolicyTargetScope
ALL- Delete policy from all endpointsENDPOINT- Delete policy only from specified endpoint
EnumPolicyTargetPipeline
REQUEST- Delete from request pipelineRESPONSE- Delete from response pipelineERROR- Delete from error pipeline
EnumHttpRequestMethod
GET,POST,PUT,DELETE,PATCH,OPTIONS,HEAD,TRACE,ALL
Note: When targetScope is ENDPOINT, both targetEndpoint and targetEndpointHTTPMethod are required.