Getting Started
- Overview
- Installation & Running
- Quickstart: Hello Gateway
- Tutorials & Guides
Core Concepts
Traffic Management
- Rules & Forwarding
- Load Balancing
Non-REST Connectivity
Rate Limiting & Request Control
- Rate Limiting
- Request Size Limiting
Content Security
- Overview
- Contextual Security
- Jailbreaks Protection
- Toxicity Detection
- Content Moderation
Application Security
Server Security
Extending Functionality
Observability & Monitoring
- Prometheus
- Metric Exporters
API Reference
- Gateway
- API Key
- Upstream
- Service
- Rule
Rule
Create Rule
Adds a new rule under a gateway
POST
/
api
/
v1
/
gateways
/
{gateway_id}
/
rules
{
"active": true,
"createdAt": "<string>",
"gatewayID": "<string>",
"headers": {},
"id": "<string>",
"methods": [
"<string>"
],
"path": "<string>",
"pluginChain": [
{
"enabled": true,
"id": "<string>",
"level": "gateway",
"name": "<string>",
"parallel": true,
"priority": 123,
"settings": {},
"stage": "pre_request"
}
],
"preserveHost": true,
"public": true,
"retryAttempts": 123,
"serviceID": "<string>",
"stripPath": true,
"trustLens": {
"app_id": "<string>",
"team_id": "<string>"
},
"updatedAt": "<string>"
}
Headers
Authorization token
Path Parameters
Gateway ID
Body
application/json
Rule request body
The body is of type object
.
Response
201
application/json
Rule created successfully
The response is of type object
.
{
"active": true,
"createdAt": "<string>",
"gatewayID": "<string>",
"headers": {},
"id": "<string>",
"methods": [
"<string>"
],
"path": "<string>",
"pluginChain": [
{
"enabled": true,
"id": "<string>",
"level": "gateway",
"name": "<string>",
"parallel": true,
"priority": 123,
"settings": {},
"stage": "pre_request"
}
],
"preserveHost": true,
"public": true,
"retryAttempts": 123,
"serviceID": "<string>",
"stripPath": true,
"trustLens": {
"app_id": "<string>",
"team_id": "<string>"
},
"updatedAt": "<string>"
}
Assistant
Responses are generated using AI and may contain mistakes.