Skip to main content

Endpoint

Authentication

Requires a Personal API Access Token.

Request

Headers

Path Parameters

Request Body

Full JSON Body Example

Request Body Fields

Policy Operation Metadata

EnumPolicyTargetScope

  • ALL - Policy applies to all endpoints
  • ENDPOINT - Policy applies only to specified endpoint

EnumPolicyTargetPipeline

  • REQUEST - Executes in request pipeline
  • RESPONSE - Executes in response pipeline
  • ERROR - Executes in error pipeline

EnumHttpRequestMethod

  • GET - GET method
  • POST - POST method
  • PUT - PUT method
  • DELETE - DELETE method
  • PATCH - PATCH method
  • OPTIONS - OPTIONS method
  • HEAD - HEAD method
  • TRACE - TRACE method
  • ALL - All methods
Note: When 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
Note: The 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:
Policy Condition (PolicyConditionDTO)
Note: If conditionRuleList is empty or not provided, a default AND condition is created.
conditionRuleList Item (ConditionRuleDTO)

EnumConditionCriteria

  • VALUE - Value comparison
  • NOT - Negation
  • AND - Logical AND
  • OR - Logical OR

EnumConditionVariableDataType

  • STRING - String type
  • NUMERIC - Numeric type
  • DATE - Date type

EnumConditionValueComparisonOperator

  • LT - Less than
  • LE - Less than or equal to
  • GT - Greater than
  • GE - Greater than or equal to
  • EQ - Equal to
  • NE - Not equal to
  • EQ_IGNORE_CASE - Equal to, case insensitive (string only)
  • NE_IGNORE_CASE - Not equal to, case insensitive (string only)
  • STARTS_WITH - Starts with (string only)
  • NOT_STARTS_WITH - Does not start with (string only)
  • STARTS_WITH_IGNORE_CASE - Starts with, case insensitive (string only)
  • NOT_STARTS_WITH_IGNORE_CASE - Does not start with, case insensitive (string only)
  • ENDS_WITH - Ends with (string only)
  • NOT_ENDS_WITH - Does not end with (string only)
  • ENDS_WITH_IGNORE_CASE - Ends with, case insensitive (string only)
  • NOT_ENDS_WITH_IGNORE_CASE - Does not end with, case insensitive (string only)
  • CONTAINS - Contains (string only)
  • NOT_CONTAINS - Does not contain (string only)
  • CONTAINS_IGNORE_CASE - Contains, case insensitive (string only)
  • NOT_CONTAINS_IGNORE_CASE - Does not contain, case insensitive (string only)
  • IS_EXISTS - Variable exists (regardless of value)
  • IS_NOT_EXISTS - Variable does not exist
  • IS_NOT_EMPTY - Variable exists and is not empty
  • IS_EMPTY - Variable does not exist or is empty
  • EXISTS_AND_EMPTY - Variable exists but is empty
  • IN - Value is in list
  • NOT_IN - Value is not in list
  • IN_IGNORE_CASE - Value is in list, case insensitive (string only)
  • NOT_IN_IGNORE_CASE - Value is not in list, case insensitive (string only)

EnumConditionValueSource

  • VALUE - Compare with a constant value
  • VARIABLE - Compare with another variable
firstVariable / secondVariable (VariableDTO)

EnumVariableType

  • HEADER - HTTP header
  • PARAMETER - Query/path/form parameter
  • BODY - Request/response body
  • CONTEXT_VALUES - Context values (e.g., current time, IP address)
  • CUSTOM - Custom variable (script-based)

EnumVariableParameterType

  • QUERY - Query parameter
  • PATH - Path parameter
  • FORM - Form parameter

EnumMessageContentType

  • JSON - JSON content
  • XML - XML content
  • FORM - Form content

EnumVariableContextValue

  • CURRENT_TIME - Current timestamp
  • CURRENT_DATE - Current date
  • CLIENT_IP - Client IP address
  • CLIENT_PORT - Client port
  • SERVER_IP - Server IP address
  • SERVER_PORT - Server port
  • REQUEST_METHOD - HTTP request method
  • REQUEST_URI - Request URI
  • REQUEST_PATH - Request path
  • REQUEST_QUERY_STRING - Query string
  • REQUEST_PROTOCOL - Request protocol
  • REQUEST_HOST - Request host
  • REQUEST_SCHEME - Request scheme
  • RESPONSE_STATUS_CODE - Response status code
  • RESPONSE_STATUS_TEXT - Response status text
  • API_PROXY_NAME - API Proxy name
  • API_PROXY_ID - API Proxy ID
  • ENDPOINT_NAME - Endpoint name
  • ENDPOINT_ID - Endpoint ID
  • ENVIRONMENT_NAME - Environment name
  • ENVIRONMENT_ID - Environment ID
  • PROJECT_NAME - Project name
  • PROJECT_ID - Project ID
  • USER_NAME - User name
  • USER_ID - User ID
  • ORGANIZATION_NAME - Organization name
  • ORGANIZATION_ID - Organization ID
  • ZONE_ID - Zone ID
  • TIMEZONE_ID - Timezone ID

EnumScriptType

  • GROOVY - Groovy script
  • JAVASCRIPT - JavaScript script

Response

Success Response (200 OK)

If deploy: true is set in the request, the response includes deployment result:

Response Fields

Deployment Result Object (deploymentResult)

Deployment Detail Object (detailList item)

EnumStatus

  • SUCCESS - Operation successful
  • FAILURE - 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 + MANAGE permission in the project
  • If deploy: true is set in the request, user must also have API_MANAGEMENT + DEPLOY_UNDEPLOY permission

Notes and Warnings

  • Policy Name: Policy name is taken from the path parameter, not from the request body. The name field 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 policyCondition is not provided, a default AND condition is created
  • Error Messages: If errorMessageList is 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