Endpoint
Authentication
Requires a Personal API Access Token.Header
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer | 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 be unique within the API Proxy) |
Request Body
Full JSON Body Example
Request Body Fields
Policy Operation Metadata
| 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). If null or >= list size, policy is added at the end |
EnumPolicyTargetScope
ALL- Policy applies to all endpointsENDPOINT- Policy applies only to specified endpoint
EnumPolicyTargetPipeline
REQUEST- Executes in request pipelineRESPONSE- Executes in response pipelineERROR- Executes in error pipeline
EnumHttpRequestMethod
GET- GET methodPOST- POST methodPUT- PUT methodDELETE- DELETE methodPATCH- PATCH methodOPTIONS- OPTIONS methodHEAD- HEAD methodTRACE- TRACE methodALL- All methods
targetScope is ENDPOINT, both targetEndpoint and targetEndpointHTTPMethod are required.
policy
The policy object structure varies by policy type. All policies share common base fields:Common Policy Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| type | string | Yes | - | Policy type (discriminator field) |
| description | string | No | - | Policy description |
| active | boolean | No | true | Whether policy is active |
| policyCondition | object | No | - | Policy condition configuration (see PolicyCondition below) |
| errorMessageList | array | No | - | Custom error messages (if not provided, standard messages are used) |
name field is not included in the request body. The policy name is taken from the path parameter {policyName}.
Policy Types
Each policy type has its own specific fields. See individual policy documentation pages for details:- API Based Throttling
- Blocked IP List
- Allowed IP List
- Authentication Basic
- … (see Policies Index for complete list)
Policy Condition (PolicyConditionDTO)
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| conditionRuleList | array | No | [] | List of condition rules. If empty, default AND condition is used |
conditionRuleList is empty or not provided, a default AND condition is created.
conditionRuleList Item (ConditionRuleDTO)
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| conditionRuleList | array | No | [] | Nested condition rules (for complex conditions) |
| conditionCriteria | string | Yes | - | Condition criteria: VALUE, NOT, AND, or OR |
| firstVariable | object | Yes | - | First variable for comparison (see VariableDTO below) |
| variableDataType | string | Yes | - | Variable data type: STRING, NUMBER, DATE, BOOLEAN |
| dateFormat | string | No | - | Date format for date comparisons (required if variableDataType=DATE) |
| valueComparisonOperator | string | Yes | - | Comparison operator (see EnumConditionValueComparisonOperator below) |
| secondValueSource | string | Yes | - | Second value source: VALUE or VARIABLE |
| secondValue | string | No* | - | Second value for comparison (required if secondValueSource=VALUE) |
| secondVariable | object | No* | - | Second variable for comparison (required if secondValueSource=VARIABLE) |
EnumConditionCriteria
VALUE- Value comparisonNOT- NegationAND- Logical ANDOR- Logical OR
EnumConditionVariableDataType
STRING- String typeNUMERIC- Numeric typeDATE- Date type
EnumConditionValueComparisonOperator
LT- Less thanLE- Less than or equal toGT- Greater thanGE- Greater than or equal toEQ- Equal toNE- Not equal toSTARTS_WITH- Starts withENDS_WITH- Ends withCONTAINS- ContainsNOT_CONTAINS- Does not containIS_EMPTY- Exists and is emptyIS_NOT_EMPTY- Exists and is not emptyIS_EXISTS- ExistsIS_NOT_EXISTS- Does not existIN- In listNOT_IN- Not in list
EnumConditionValueSource
VALUE- Compare with a constant valueVARIABLE- Compare with another variable
firstVariable / secondVariable (VariableDTO)
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | No | - | Variable ID (if referencing existing variable) |
| projectId | string | No | - | Project ID (if referencing existing variable) |
| name | string | No* | - | Variable name (required if id not provided) |
| description | string | No | - | Variable description |
| type | string | Yes | - | Variable type: HEADER, PARAMETER, BODY, CONTEXT_VALUES, CUSTOM |
| headerName | string | No* | - | Header name (required if type=HEADER) |
| paramType | string | No* | - | Parameter type: QUERY, PATH, FORM (required if type=PARAMETER) |
| paramName | string | No* | - | Parameter name (required if type=PARAMETER) |
| paramPath | string | No | - | Parameter path |
| formName | string | No | - | Form name (for form parameters) |
| xpathValue | string | No* | - | XPath value (required if type=BODY and content is XML) |
| jsonPathValue | string | No* | - | JSONPath value (required if type=BODY and content is JSON) |
| messageContentType | string | No* | - | Message content type: JSON, XML, FORM (required if type=BODY) |
| contextValue | string | No* | - | Context value (required if type=CONTEXT_VALUES) |
| zoneId | string | No | - | Zone ID (for date context values) |
| initWithScript | boolean | No | false | Initialize with script |
| scriptLanguage | string | No | - | Script language: GROOVY, JAVASCRIPT (required if initWithScript=true) |
| scriptBody | string | No | - | Script body (required if initWithScript=true) |
EnumVariableType
HEADER- HTTP headerPARAMETER- Query/path/form parameterBODY- Request/response bodyCONTEXT_VALUES- Context values (e.g., current time, IP address)CUSTOM- Custom variable (script-based)
EnumVariableParameterType
QUERY- Query parameterPATH- Path parameterFORM- Form parameter
EnumMessageContentType
JSON- JSON contentXML- XML contentFORM- Form content
EnumVariableContextValue
CURRENT_TIME- Current timestampCURRENT_DATE- Current dateCLIENT_IP- Client IP addressCLIENT_PORT- Client portSERVER_IP- Server IP addressSERVER_PORT- Server portREQUEST_METHOD- HTTP request methodREQUEST_URI- Request URIREQUEST_PATH- Request pathREQUEST_QUERY_STRING- Query stringREQUEST_PROTOCOL- Request protocolREQUEST_HOST- Request hostREQUEST_SCHEME- Request schemeRESPONSE_STATUS_CODE- Response status codeRESPONSE_STATUS_TEXT- Response status textAPI_PROXY_NAME- API Proxy nameAPI_PROXY_ID- API Proxy IDENDPOINT_NAME- Endpoint nameENDPOINT_ID- Endpoint IDENVIRONMENT_NAME- Environment nameENVIRONMENT_ID- Environment IDPROJECT_NAME- Project namePROJECT_ID- Project IDUSER_NAME- User nameUSER_ID- User IDORGANIZATION_NAME- Organization nameORGANIZATION_ID- Organization IDZONE_ID- Zone IDTIMEZONE_ID- Timezone ID
EnumScriptType
GROOVY- Groovy scriptJAVASCRIPT- JavaScript script
Response
Success Response (200 OK)
deploy: true is set in the request, the response includes deployment result:
Response Fields
| Field | Type | Description |
|---|---|---|
| status | string | Response status: SUCCESS or FAILURE |
| deploymentResult | object | Deployment result (if deploy=true). See Deployment Result Object |
Deployment Result Object (deploymentResult)
| Field | Type | Description |
|---|---|---|
| success | boolean | Overall deployment success status |
| responseTime | integer | Total deployment response time in milliseconds |
| detailList | array | List of deployment details per pod/environment |
Deployment Detail Object (detailList item)
| Field | Type | Description |
|---|---|---|
| envName | string | Environment name |
| podName | string | Pod name where deployment occurred |
| podIp | string | Pod IP address |
| success | boolean | Deployment success status for this pod |
| responseTime | integer | Deployment response time for this pod in milliseconds |
EnumStatus
SUCCESS- Operation successfulFAILURE- Operation failed
Error Response (400 Bad Request)
Common Causes
- Policy name already exists
- Invalid targetScope (ENDPOINT without targetEndpoint)
- Invalid targetEndpoint (endpoint not found in API Proxy)
- Invalid policy type
- Missing required policy fields
- Invalid condition configuration
Error Response (401 Unauthorized)
Error Response (404 Not Found)
cURL Example
Example 1: Add Policy to All Endpoints
Example 2: Add Policy to Specific Endpoint
Example 3: Add Policy with Condition
Permissions
- User must have
API_MANAGEMENT+MANAGEpermission in the project - If
deploy: trueis set in the request, user must also haveAPI_MANAGEMENT+DEPLOY_UNDEPLOYpermission
Notes and Warnings
- Policy Name: Policy name is taken from the path parameter, not from the request body. The
namefield in PolicyDTO is ignored (marked with @JsonIgnore). - Unique Names: Policy names must be unique within the API Proxy
- Order: Order starts from 1. If order is null or >= current policy list size, policy is added at the end
- Deployment: If
deploy: true, ensure environments exist and user has deployment permissions - Conditions: If
policyConditionis not provided, a default AND condition is created - Error Messages: If
errorMessageListis not provided, standard error messages are used - Endpoint Scope: When using
targetScope: ENDPOINT, ensure the endpoint exists in the API Proxy - Variable References: Variables can be referenced by
id(if existing) or defined inline
Related Documentation
- List Policies - List all policies
- Update Policy - Update an existing policy
- Delete Policy - Delete a policy
- Policy API Based Throttling - Example policy documentation

