Listing the routing rules¶
Note
The Admin API requires no token. The Admin API is typically protected at the network level.
Send the request as GET to the path /admin/v1/gateways/{gateway_id}/rules.
Request¶
The following parameters are available:
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
gateway_id |
path | string |
yes | ID of the gateway. |
Example¶
Example of the response body:
{
"rules": [
{
"id": "rule_abc123",
"priority": 10,
"conditions": [
{
"field": "…",
"op": "…",
"value": "…"
}
],
"actions": {
"provider": "openai",
"model": "gpt-4o",
"fallbacks": [
"…"
]
}
}
]
}
Responses¶
The endpoint answers the request with the following status codes:
| Status code | Description |
|---|---|
200 |
Ordered list of routing rules. |