Rule
Create Rule
Adds a new rule under a gateway
POST
cURL
Headers
Authorization token
Path Parameters
GatewayDTO ID
Body
application/json
Rule request body
Response
Rule created successfully
Available options:
agent, endpoint Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Adds a new rule under a gateway
curl --request POST \
--url https://api.example.com/api/v1/gateways/{gateway_id}/rules \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"path": "<string>",
"service_id": "<string>",
"headers": {},
"methods": [
"<string>"
],
"plugin_chain": [
{
"enabled": true,
"id": "<string>",
"name": "<string>",
"parallel": true,
"priority": 123,
"settings": {}
}
],
"preserve_host": true,
"retry_attempts": 123,
"session_config": {
"body_param_name": "<string>",
"header_name": "<string>"
},
"strip_path": true,
"trustlens": {
"mapping": {
"input": {
"data_projection": {},
"extract_fields": {}
},
"output": {
"data_projection": {},
"extract_fields": {}
}
},
"team_id": "<string>",
"type": "<string>"
},
"type": "<string>"
}
'{
"active": true,
"createdAt": "<string>",
"gatewayID": "<string>",
"headers": {},
"id": "<string>",
"methods": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"pluginChain": [
{
"enabled": true,
"id": "<string>",
"name": "<string>",
"parallel": true,
"priority": 123,
"settings": {}
}
],
"preserveHost": true,
"public": true,
"retryAttempts": 123,
"serviceID": "<string>",
"session_config": {
"body_param_name": "<string>",
"header_name": "<string>"
},
"stripPath": true,
"trustLens": {
"mapping": {
"input": {
"data_projection": {},
"extract_fields": {}
},
"output": {
"data_projection": {},
"extract_fields": {}
}
},
"team_id": "<string>",
"type": "<string>"
},
"updatedAt": "<string>"
}Authorization token
GatewayDTO ID
Rule request body
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Rule created successfully
Show child attributes
Show child attributes
Show child attributes
Show child attributes
agent, endpoint curl --request POST \
--url https://api.example.com/api/v1/gateways/{gateway_id}/rules \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"path": "<string>",
"service_id": "<string>",
"headers": {},
"methods": [
"<string>"
],
"plugin_chain": [
{
"enabled": true,
"id": "<string>",
"name": "<string>",
"parallel": true,
"priority": 123,
"settings": {}
}
],
"preserve_host": true,
"retry_attempts": 123,
"session_config": {
"body_param_name": "<string>",
"header_name": "<string>"
},
"strip_path": true,
"trustlens": {
"mapping": {
"input": {
"data_projection": {},
"extract_fields": {}
},
"output": {
"data_projection": {},
"extract_fields": {}
}
},
"team_id": "<string>",
"type": "<string>"
},
"type": "<string>"
}
'{
"active": true,
"createdAt": "<string>",
"gatewayID": "<string>",
"headers": {},
"id": "<string>",
"methods": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"pluginChain": [
{
"enabled": true,
"id": "<string>",
"name": "<string>",
"parallel": true,
"priority": 123,
"settings": {}
}
],
"preserveHost": true,
"public": true,
"retryAttempts": 123,
"serviceID": "<string>",
"session_config": {
"body_param_name": "<string>",
"header_name": "<string>"
},
"stripPath": true,
"trustLens": {
"mapping": {
"input": {
"data_projection": {},
"extract_fields": {}
},
"output": {
"data_projection": {},
"extract_fields": {}
}
},
"team_id": "<string>",
"type": "<string>"
},
"updatedAt": "<string>"
}