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>",
"level": "gateway",
"name": "<string>",
"parallel": true,
"priority": 123,
"settings": {},
"stage": "pre_request"
}
],
"preserve_host": true,
"retry_attempts": 123,
"strip_path": true,
"trustlens": {
"app_id": "<string>",
"mapping": {
"input": {
"data_projection": {},
"extract_fields": {}
},
"output": {
"data_projection": {},
"extract_fields": {}
}
},
"team_id": "<string>",
"type": "<string>"
}
}
'{
"active": true,
"createdAt": "<string>",
"gatewayID": "<string>",
"headers": {},
"id": "<string>",
"methods": [
"<string>"
],
"name": "<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>",
"mapping": {
"input": {
"data_projection": {},
"extract_fields": {}
},
"output": {
"data_projection": {},
"extract_fields": {}
}
},
"team_id": "<string>",
"type": "<string>"
},
"updatedAt": "<string>"
}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>",
"level": "gateway",
"name": "<string>",
"parallel": true,
"priority": 123,
"settings": {},
"stage": "pre_request"
}
],
"preserve_host": true,
"retry_attempts": 123,
"strip_path": true,
"trustlens": {
"app_id": "<string>",
"mapping": {
"input": {
"data_projection": {},
"extract_fields": {}
},
"output": {
"data_projection": {},
"extract_fields": {}
}
},
"team_id": "<string>",
"type": "<string>"
}
}
'{
"active": true,
"createdAt": "<string>",
"gatewayID": "<string>",
"headers": {},
"id": "<string>",
"methods": [
"<string>"
],
"name": "<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>",
"mapping": {
"input": {
"data_projection": {},
"extract_fields": {}
},
"output": {
"data_projection": {},
"extract_fields": {}
}
},
"team_id": "<string>",
"type": "<string>"
},
"updatedAt": "<string>"
}Authorization token
Gateway ID
Rule request body
Rule created successfully
Show child attributes
Show child attributes
Show child attributes