General Information
Policy Type
Endpoints
List Policies
Add Policy
Update Policy
Delete Policy
List Policies
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
Response
Success Response (200 OK)
cURL Example
Add Policy
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
| Content-Type | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
| policyName | string | Yes | Policy name |
Request Body
Full JSON Body Example - Block SQL Injection
Full JSON Body Example - Delete Sensitive Data
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 adding policy |
| deployTargetEnvironmentNameList | array | No | [] | List of environment names to deploy to |
| order | integer | No | null | Policy execution order (starts from 1) |
ALL- Policy applies to all endpointsENDPOINT- Policy applies only to specified endpoint
REQUEST- Executes in request pipeline (filters request content)RESPONSE- Executes in response pipeline (filters response content)ERROR- Executes in error pipeline
GET,POST,PUT,DELETE,PATCH,OPTIONS,HEAD
policy
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| type | string | Yes | - | Policy type: policy-content-filter |
| description | string | No | - | Policy description |
| active | boolean | No | true | Whether policy is active |
| policyContentFilterDefList | array | Yes | - | List of filter definitions (at least one required) |
policyContentFilterDefList must contain at least one filter definition.
policyContentFilterDefList
Each filter definition is an object with the following fields:| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| id | integer | No | - | Filter definition ID (auto-generated) |
| name | string | Yes | - | Filter definition name |
| ruleValue | string | Yes | - | Regex pattern to match |
| headerActive | boolean | No | false | Apply filter to headers |
| bodyActive | boolean | No | false | Apply filter to body |
| paramActive | boolean | No | false | Apply filter to parameters |
| action | string | No | BLOCK | Action: BLOCK or DELETE |
| contentType | string | No | XML | Content type: XML, JSON, or ALL_BODY |
| content | string | No | null | Additional content configuration |
EnumContentFilterAction
BLOCK- Block the request/response if pattern matchesDELETE- Delete matching content from request/response
EnumMessageContentType
XML- Filter XML contentJSON- Filter JSON contentALL_BODY- Filter all body content types
Regex Pattern
ruleValuemust be a valid Java regex pattern- Use
(?i)prefix for case-insensitive matching - Use
\\bfor word boundaries - Use
\\dfor digits,\\sfor whitespace - Use
[]for character classes,()for groups
Note
- At least one of
headerActive,bodyActive, orparamActivemust betrue. nameandruleValueare required.actiondefaults toBLOCKif not specified.
Response
Success Response (200 OK)
cURL Example
Update Policy
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
| Content-Type | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
| policyName | string | Yes | Policy name |
Request Body
Full JSON Body Example
Response
Success Response (200 OK)
Delete Policy
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
| Content-Type | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
| policyName | string | Yes | Policy name |
Request Body
Full JSON Body Example
Response
Success Response (200 OK)
Notes and Warnings
-
Action Type:
BLOCK- Rejects the request/response if pattern matchesDELETE- Removes matching content from request/response
-
Content Type:
XML- Filter XML content onlyJSON- Filter JSON content onlyALL_BODY- Filter all body content types
-
Active Flags: At least one of
headerActive,bodyActive, orparamActivemust betrue -
Regex Pattern:
- Must be valid Java regex pattern
- Use
(?i)for case-insensitive matching - Use
\\bfor word boundaries - Use
\\dfor digits,\\sfor whitespace
- Performance: Content filtering adds processing overhead. Use efficient regex patterns.
-
Pipeline:
REQUESTpipeline filters request content before forwardingRESPONSEpipeline filters response content before sending to client
-
Block Action: When
action: BLOCK, the entire request/response is rejected -
Delete Action: When
action: DELETE, only matching content is removed - Multiple Filters: Multiple filter definitions are evaluated in order
- Error Handling: Invalid regex patterns may cause policy execution to fail
-
Deployment: Policy changes require deployment to take effect. Set
deploy: trueor deploy manually.
Related Documentation
- List Policies - List all policies
- Add Policy - General policy addition guide
- Update Policy - General policy update guide
- Delete Policy - General policy deletion guide
- Redaction Policy - Remove or modify sensitive data

