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 - Key Existence Redaction
Full JSON Body Example - Key Value Redaction with Masking
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 (redacts request data)RESPONSE- Executes in response pipeline (redacts response data)ERROR- Executes in error pipeline
GET,POST,PUT,DELETE,PATCH,OPTIONS,HEAD
policy
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| type | string | Yes | - | Policy type: policy-redaction |
| description | string | No | - | Policy description |
| active | boolean | No | true | Whether policy is active |
| redactionDefList | array | Yes | - | List of redaction definitions (at least one required) |
redactionDefList must contain at least one redaction definition.
redactionDefList
Each redaction definition is an object with the following fields:| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| redactionType | string | Yes | - | Redaction type: KEY_EXISTENCE, KEY_VALUE, USER, or ROLE |
| keyValueVar | object | No* | - | Variable for key matching (required for KEY_EXISTENCE and KEY_VALUE) |
| keyValueListStr | string | No* | - | Comma-separated list of values to match (required for KEY_VALUE) |
| redactionDefDetailList | array | Yes | - | List of redaction actions (at least one required) |
EnumPolicyRedactionType
KEY_EXISTENCE- Redact if key exists (useskeyValueVar)KEY_VALUE- Redact if key value matches (useskeyValueVarandkeyValueListStr)USER- Redact based on user contextROLE- Redact based on role context
Note
- For
KEY_EXISTENCEandKEY_VALUE,keyValueVaris required. - For
KEY_VALUE,keyValueListStris required (comma-separated values). redactionDefDetailListmust contain at least one detail.
redactionDefDetailList
Each detail is an object with the following fields:| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| orderNum | integer | Yes | - | Execution order (starts from 1) |
| action | object | Yes | - | Action to perform (MODIFY or DELETE) |
orderNum order.
action
Action object with the following fields:| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| actionType | string | Yes | - | Action type: MODIFY or DELETE |
| sourceVar | object | Yes | - | Source variable to redact |
| sourceVarBodyInjectionFieldName | string | No | - | Body injection field name |
| sourceDataType | string | No* | - | Source data type (required for MODIFY) |
| sourceTemporalFormat | string | No | - | Temporal format (if sourceDataType=TEMPORAL) |
| operator | string | No* | - | Modification operator (required for MODIFY) |
| substringFrom | integer | No | - | Substring start index (for SUBSTRING operator) |
| substringTo | integer | No | - | Substring end index (for SUBSTRING operator) |
| maskFrom | integer | No | - | Mask start index (for MASK operator) |
| maskTo | integer | No | - | Mask end index (for MASK operator) |
| replaceSource | string | No | - | Replace source pattern (for REPLACE_IN/REPLACE_WITH) |
| insertOffset | integer | No | - | Insert offset (for INSERT operator) |
| temporalOperatorTimeUnit | string | No | - | Temporal time unit (for TEMPORAL operations) |
| replaceFirst | string | No | - | Replace first pattern (for REPLACE_FIRST) |
| targetValSource | string | No* | - | Target value source (required for MODIFY) |
| targetVal | string | No* | - | Target value (required if targetValSource=VALUE) |
| targetVar | object | No* | - | Target variable (required if targetValSource=VARIABLE) |
| transformationContentType | string | No | - | Transformation content type |
| formatAllowsInvalid | boolean | No | false | Format allows invalid characters |
| formatValueContainsLiteralCharacters | boolean | No | false | Format value contains literal characters |
| formatInvalidCharacters | string | No | - | Format invalid characters |
| formatPlaceholder | string | No | - | Format placeholder |
| jsonToXmlIgnoreNull | boolean | No | false | JSON to XML ignore null |
| jsonToXmlIgnoreEmpty | boolean | No | false | JSON to XML ignore empty |
| jsonToXmlUseNullForNil | boolean | No | false | JSON to XML use null for nil |
| jsonToXmlUnwrapElement | boolean | No | false | JSON to XML unwrap element |
| xmlToJsonUnwrapElement | boolean | No | false | XML to JSON unwrap element |
| xmlToJsonIgnoreNull | boolean | No | false | XML to JSON ignore null |
| xmlToJsonIgnoreEmpty | boolean | No | false | XML to JSON ignore empty |
| xmlToJsonNumbersAsStrings | boolean | No | false | XML to JSON numbers as strings |
| xmlToJsonUseNullForNil | boolean | No | false | XML to JSON use null for nil |
| xmlToJsonArrayPathList | array | No | [] | XML to JSON array path list |
| claimJsonPath | string | No | - | JWT claim JSON path |
EnumActionType
MODIFY- Modify the value (mask, replace, transform, etc.)DELETE- Delete the value completely
EnumActionSourceDataType
STRING- String data typeNUMERIC- Numeric data typeTEMPORAL- Date/time data type
EnumActionSourceValueModificationOperator
- Numeric operations:
ADD,SUBTRACT,MULTIPLY,DIVIDE,MODULUS,POWER - String operations:
CONCAT,REPLACE_IN,REPLACE_WITH,REPLACE_FIRST,SUBSTRING,MASK,FORMAT,TRANSFORM,INSERT,TRIM,ENCODE,DECODE,URL_ENCODE,URL_DECODE,EXTRACT_JWT_HEADER_CLAIM,EXTRACT_JWT_BODY_CLAIM - Temporal operations:
ADD_TEMPORAL,SUBTRACT_TEMPORAL
EnumValueSource
VALUE- Use static valueVARIABLE- Extract from variable
EnumTransformationContentType
XSLT- XSLT transformationJOLT- JOLT transformationXML2JSON- XML to JSON conversionJSON2XML- JSON to XML conversion
EnumTimeUnit
MILLISECOND,SECOND,MINUTE,HOUR,DAY,WEEK,MONTH,YEAR
Note
- For
DELETEaction, onlyactionTypeandsourceVarare required. - For
MODIFYaction,sourceDataType,operator, andtargetValSourceare required. - Operator-specific fields (e.g.,
maskFrom,maskTofor MASK) are required based on the operator.
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
-
Redaction Type:
KEY_EXISTENCE- Redact if key existsKEY_VALUE- Redact if key value matches listUSER- Redact based on user contextROLE- Redact based on role context
-
Action Type:
DELETE- Completely remove the valueMODIFY- Modify the value (mask, replace, transform, etc.)
-
Order: Actions are executed in
orderNumorder within each redaction definition -
Key Value List: For
KEY_VALUEtype, provide comma-separated values inkeyValueListStr -
Masking: Use
MASKoperator withmaskFromandmaskToto mask portions of values -
Substring: Use
SUBSTRINGoperator withsubstringFromandsubstringToto extract portions -
Replace: Use
REPLACE_IN,REPLACE_WITH, orREPLACE_FIRSTto replace patterns -
Transformation: Use
TRANSFORMoperator withtransformationContentTypefor format conversion - Performance: Redaction adds processing overhead. Use for necessary data protection only.
-
Pipeline:
REQUESTpipeline redacts request data before forwardingRESPONSEpipeline redacts response data before sending to client
- Error Handling: Invalid redaction configuration 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
- Content Filter Policy - Filter content based on patterns

