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 - Synchronous Call with Cache
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 pipelineRESPONSE- Executes in response pipelineERROR- Executes in error pipeline
GET,POST,PUT,DELETE,PATCH,OPTIONS,HEAD
policy
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| type | string | Yes | - | Policy type: policy-api-call |
| description | string | No | - | Policy description |
| active | boolean | No | true | Whether policy is active |
| callType | string | Yes | - | Call type: SYNCHRONOUS or ONE_WAY |
| httpMethod | string | Yes | - | HTTP method for API call |
| url | string | Yes | - | Target API URL |
| timeout | integer | No | - | Request timeout in milliseconds |
| certificateName | string | No | - | Certificate name for mTLS (required if certificateEnabled=true) |
| certificateEnabled | boolean | No | false | Enable mTLS certificate |
| clearBodyBeforeCall | boolean | No | false | Clear request body before API call |
| useMessageTemplateBeforeCall | boolean | No | true | Use message template for request body |
| enumTestConsoleRequestBodyType | string | No | XML | Request body content type |
| bodyContentBeforeCall | string | No | - | Request body template |
| urlEncodedList | array | No | [] | URL encoded form parameters |
| dataManipulationListBeforeCall | array | No | [] | Data manipulation for request |
| removeAllHeadersBeforeCall | boolean | No | true | Remove all headers before call |
| headersToBeDeletedBeforeCallList | array | No | [] | Headers to delete before call |
| headersToBeAddedBeforeCallList | array | No | [] | Headers to add before call |
| removeAllParametersBeforeCall | boolean | No | true | Remove all parameters before call |
| parametersToBeDeletedBeforeCallList | array | No | [] | Parameters to delete before call |
| parametersToBeAddedBeforeCallList | array | No | [] | Parameters to add before call |
| enableCache | boolean | No | false | Enable response caching |
| cacheBy | object | No | - | Variable for cache key |
| capacity | integer | No* | - | Cache capacity (required if enableCache=true) |
| ttl | integer | No* | - | Cache TTL in seconds (required if enableCache=true) |
| cacheNullResponses | boolean | No | true | Cache null/error responses |
| cacheStorageType | string | No | DISTRIBUTED | Cache storage type |
| afterCallBodyOperationType | string | No | - | Operation on original body after call |
| useMessageTemplateAfterCall | boolean | No | true | Use message template after call |
| messageTemplateContentTypeAfterCall | string | No | XML | Response body content type |
| bodyContentAfterCall | string | No | - | Response body template |
| dataManipulationListAfterCall | array | No | [] | Data manipulation for response |
| removeAllHeadersAfterCall | boolean | No | false | Remove all headers after call |
| headersToBeDeletedAfterCallList | array | No | [] | Headers to delete after call |
| headersToBeAddedAfterCallList | array | No | [] | Headers to add after call |
| removeAllParametersAfterCall | boolean | No | false | Remove all parameters after call |
| parametersToBeDeletedAfterCallList | array | No | [] | Parameters to delete after call |
| parametersToBeAddedAfterCallList | array | No | [] | Parameters to add after call |
| prepareMessage | boolean | No | false | Prepare message flag |
| modifyMessage | boolean | No | false | Modify message flag |
| newBodyContentSourceType | string | No | - | Source type for new body content |
EnumPolicyRestApiCallType
SYNCHRONOUS- Two-way call, waits for response (supports caching)ONE_WAY- Fire-and-forget call, no response expected (no caching)
EnumHttpRequestMethod
GET- GET requestPOST- POST requestPUT- PUT requestDELETE- DELETE requestPATCH- PATCH requestOPTIONS- OPTIONS requestHEAD- HEAD request
EnumMessageTemplateContentType
XML- XML contentJSON- JSON contentRAW- Raw text contentURL_ENCODED- application/x-www-form-urlencoded
EnumCacheStorageType
LOCAL- Local cache (per node)DISTRIBUTED- Distributed cache (shared across nodes)
EnumOriginalMessageOperationType
NOT_CHANGE_BODY- Keep original body unchangedREPLACE_BODY- Replace original body with API call responseCLEAR_BODY- Clear original body after call
EnumMessageTemplateContentType (After Call)
XML- XML contentJSON- JSON contentRAW- Raw text content
EnumBodyContentSourceType
VALUE- Use static valueVARIABLE- Use variable value
Note
urlandhttpMethodare required.callTypeis required.- If
enableCache: true,capacityandttlare required, andcallTypemust beSYNCHRONOUS. - If
certificateEnabled: true,certificateNameis required.
headersToBeAddedBeforeCallList / headersToBeAddedAfterCallList
Each header is an object with the following fields:| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Header name |
| description | string | No | Header description |
| valueSource | string | Yes | Value source: VALUE or VARIABLE |
| value | string | No* | Header value (required if valueSource=VALUE) |
| variable | object | No* | Variable object (required if valueSource=VARIABLE) |
| prefix | string | No | Header prefix |
EnumValueSource
VALUE- Use static valueVARIABLE- Extract from variable
EnumRestApiHeaderPrefix
NONE- No prefixBASIC- Basic prefix (for Authorization header)BEARER- Bearer prefix (for Authorization header)DIGEST- Digest prefix (for Authorization header)
Note
- If
valueSource: VALUE, providevalue. - If
valueSource: VARIABLE, providevariableobject.
parametersToBeAddedBeforeCallList / parametersToBeAddedAfterCallList
Each parameter is an object with the following fields:| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Parameter name |
| description | string | No | Parameter description |
| valueSource | string | Yes | Value source: VALUE or VARIABLE |
| value | string | No* | Parameter value (required if valueSource=VALUE) |
| variable | object | No* | Variable object (required if valueSource=VARIABLE) |
EnumValueSource
VALUE- Use static valueVARIABLE- Extract from variable
Note
- If
valueSource: VALUE, providevalue. - If
valueSource: VARIABLE, providevariableobject.
urlEncodedList
Each form parameter is an object with the following fields:| Field | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | Form parameter key |
| value | string | Yes | Form parameter value |
| description | string | No | Parameter description |
enumTestConsoleRequestBodyType: URL_ENCODED.
dataManipulationListBeforeCall / dataManipulationListAfterCall
Each data manipulation is an object with the following fields:| Field | Type | Required | Description |
|---|---|---|---|
| operation | string | Yes | Operation type: ADD, ADD_OR_EDIT, or DELETE |
| sourceValueSource | string | No | Source value source: VALUE or VARIABLE |
| sourceVar | object | No | Source variable |
| sourceValue | string | No | Source value |
| targetName | string | Yes | Target field name/path |
| targetValueSource | string | No | Target value source: VALUE or VARIABLE |
| targetVar | object | No | Target variable |
| targetValue | string | No | Target value |
EnumRestApiDataManipulationDefOperation
ADD- Add new fieldADD_OR_EDIT- Add or edit existing fieldDELETE- Delete field
EnumValueSource
VALUE- Use static valueVARIABLE- Extract from variable
cacheBy
Variable object for cache key generation:| Field | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | Variable type: HEADER, PARAMETER, BODY, CONTEXT, SCRIPT |
| headerName | string | No* | Header name (required if type=HEADER) |
| paramName | string | No* | Parameter name (required if type=PARAMETER) |
| contextValue | string | No* | Context value (required if type=CONTEXT) |
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
Request Body Fields
operationMetadata
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| targetScope | string | Yes | - | Policy scope: ALL or ENDPOINT |
| targetPipeline | string | Yes | - | Pipeline: REQUEST, RESPONSE, or ERROR |
| deploy | boolean | No | false | Whether to deploy after deletion |
Response
Success Response (200 OK)
Notes and Warnings
-
Call Type:
SYNCHRONOUS- Waits for response, supports cachingONE_WAY- Fire-and-forget, no caching support
-
Caching:
- Only available for
SYNCHRONOUScalls - Requires
capacityandttlwhen enabled - Cache key can be based on variable (e.g., Authorization header)
- Only available for
-
mTLS:
- Requires
certificateNamewhencertificateEnabled: true - Certificate name is resolved to certificate ID automatically
- Certificate must be configured in Certificate Store (project or global)
- Certificate is searched first in project, then in global certificates
- Requires
-
Request Transformation:
- Use
bodyContentBeforeCallwith variable placeholders (e.g.,${userId}) - Variables are replaced at runtime
- Use
-
Response Handling:
NOT_CHANGE_BODY- Original body remains unchangedREPLACE_BODY- Original body replaced with API responseCLEAR_BODY- Original body cleared
-
Headers and Parameters:
- Can remove all or specific headers/parameters
- Can add new headers/parameters with static values or variables
-
URL Encoded Forms:
- Use
urlEncodedListwhenenumTestConsoleRequestBodyType: URL_ENCODED
- Use
-
Data Manipulation:
- Add, edit, or delete fields in request/response
- Supports variable extraction and transformation
- Timeout: Specified in milliseconds
-
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

