General Information
Policy Type
Endpoints
List Policies
Add Policy
Update Policy
Delete Policy
List Policies
Endpoint
Request
Headers
Path Parameters
Response
Success Response (200 OK)
cURL Example
Add Policy
Endpoint
Request
Headers
Path Parameters
Request Body
Full JSON Body Example
Request Body Fields
operationMetadata
Enum: targetScope
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
Enum: throttlingInterval
ONE_SECOND- 1 secondONE_MINUTE- 1 minuteONE_HOUR- 1 hourONE_DAY- 1 day
FIXED- Fixed time windowSLIDING- Sliding time window
FAIL- Fail request if cache error occursALLOW- Allow request if cache error occurs
targetVariableForIdentity
See Variable Definition for complete variable documentation.Variable Types
HEADER- Extract from HTTP headerPARAMETER- Extract from query/path/form parameterBODY- Extract from request body (XML, JSON, or raw)CONTEXT_VALUES- Extract from system context values (e.g., CLIENT_IP, REQUEST_URI)CUSTOM- Extract using custom script
Common Context Values
REQUEST_REMOTE_ADDRESS- Client IP addressREQUEST_REQUEST_URI- Request URIREQUEST_HTTP_METHOD- HTTP methodREQUEST_USERNAME_KEY- Username or key
detailList (Optional)
Response
Success Response (200 OK)
cURL Example
Update Policy
Endpoint
Request
Headers
Path Parameters
Request Body
Full JSON Body Example
Response
Success Response (200 OK)
cURL Example
Delete Policy
Endpoint
Request
Headers
Path Parameters
Request Body
Full JSON Body Example
Request Body Fields
operationMetadata
Response
Success Response (200 OK)
cURL Example
Notes and Warnings
- Cache Dependency: This policy requires a cache connection. Ensure cache is properly configured.
-
Identity Variable: Choose the identity variable carefully. Common choices:
HEADERwith API key header - For API key-based throttlingCONTEXTwithCLIENT_IP- For IP-based throttlingPARAMETERwith user ID - For user-based throttling
-
Window Types:
FIXED- Fixed time windows (e.g., minute 1:00-1:59)SLIDING- Sliding time windows (last 60 seconds from current time)
- Detail List: Use detailList to provide different limits for specific values (e.g., VIP users)
-
Rate Limit Headers: When
showRateLimitStatisticsInResponseHeaderis true, response includes:X-RateLimit-Limit- Maximum requests allowedX-RateLimit-Remaining- Remaining requests in current windowX-RateLimit-Reset- Time when limit resets
-
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

