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
List Rules
Returns a list of all rules for a gateway
GET
/
api
/
v1
/
gateways
/
{gateway_id}
/
rules
{
"gateway": {
"created_at": "<string>",
"id": "<string>",
"name": "<string>",
"plugin_chain": [
{
"enabled": true,
"id": "<string>",
"level": "gateway",
"name": "<string>",
"parallel": true,
"priority": 123,
"settings": {},
"stage": "pre_request"
}
],
"status": "<string>",
"updated_at": "<string>"
},
"rules": [
{
"active": true,
"created_at": "<string>",
"headers": {},
"id": "<string>",
"methods": [
"<string>"
],
"path": "<string>",
"plugin_chain": [
{
"enabled": true,
"id": "<string>",
"level": "gateway",
"name": "<string>",
"parallel": true,
"priority": 123,
"settings": {},
"stage": "pre_request"
}
],
"service_id": "<string>",
"trustlens": {
"app_id": "<string>",
"team_id": "<string>"
},
"updated_at": "<string>",
"upstream": {
"algorithm": "<string>",
"name": "<string>",
"targets": [
{
"credentials": {
"allow_override": true,
"aws_access_key_id": "<string>",
"aws_secret_access_key": "<string>",
"azure_client_id": "<string>",
"azure_client_secret": "<string>",
"azure_tenant_id": "<string>",
"azure_use_managed_identity": true,
"gcp_service_account_json": "<string>",
"gcp_use_service_account": true,
"header_name": "<string>",
"header_value": "<string>",
"param_location": "<string>",
"param_name": "<string>",
"param_value": "<string>"
},
"default_model": "<string>",
"description": "<string>",
"headers": {},
"host": "<string>",
"id": "<string>",
"models": [
"<string>"
],
"path": "<string>",
"port": 123,
"priority": 123,
"protocol": "<string>",
"provider": "<string>",
"stream": true,
"tags": [
"<string>"
],
"weight": 123
}
]
}
}
]
}
Headers
Authorization token
Path Parameters
Gateway ID
Response
200
application/json
List of rules
The response is of type object
.
{
"gateway": {
"created_at": "<string>",
"id": "<string>",
"name": "<string>",
"plugin_chain": [
{
"enabled": true,
"id": "<string>",
"level": "gateway",
"name": "<string>",
"parallel": true,
"priority": 123,
"settings": {},
"stage": "pre_request"
}
],
"status": "<string>",
"updated_at": "<string>"
},
"rules": [
{
"active": true,
"created_at": "<string>",
"headers": {},
"id": "<string>",
"methods": [
"<string>"
],
"path": "<string>",
"plugin_chain": [
{
"enabled": true,
"id": "<string>",
"level": "gateway",
"name": "<string>",
"parallel": true,
"priority": 123,
"settings": {},
"stage": "pre_request"
}
],
"service_id": "<string>",
"trustlens": {
"app_id": "<string>",
"team_id": "<string>"
},
"updated_at": "<string>",
"upstream": {
"algorithm": "<string>",
"name": "<string>",
"targets": [
{
"credentials": {
"allow_override": true,
"aws_access_key_id": "<string>",
"aws_secret_access_key": "<string>",
"azure_client_id": "<string>",
"azure_client_secret": "<string>",
"azure_tenant_id": "<string>",
"azure_use_managed_identity": true,
"gcp_service_account_json": "<string>",
"gcp_use_service_account": true,
"header_name": "<string>",
"header_value": "<string>",
"param_location": "<string>",
"param_name": "<string>",
"param_value": "<string>"
},
"default_model": "<string>",
"description": "<string>",
"headers": {},
"host": "<string>",
"id": "<string>",
"models": [
"<string>"
],
"path": "<string>",
"port": 123,
"priority": 123,
"protocol": "<string>",
"provider": "<string>",
"stream": true,
"tags": [
"<string>"
],
"weight": 123
}
]
}
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.