Create Rule
Adds a new routing rule to the gateway.
| routing_strategy | Behaviour |
|---|---|
| Weight-Based | Distributes traffic according to the weight assigned to each endpoint. |
| Prefix-Based | Routes requests by URL path prefix. All referenced endpoints must be in READY status. |
| Header-Based | Routes requests by matching HTTP request headers. |
| Path-Based | Routes requests by matching the full URL path. |
POST
/gateway/{gateway_id}/rules/Path parameters
gateway_idPathintegerrequiredGateway ID
Query parameters
project_idQueryintegerrequiredProject ID
locationQuerystringrequiredLocation
active_iamQueryintegeroptionalActive IAM ID (To access contact person account) Find your Active IAM ID here
Request body
application/json
Name of the routing rule. Must be unique within the gateway.
example
llama-routeTraffic routing strategy.
Weight-Based— distributes traffic by weight across endpoints.Prefix-Based— routes by URL path prefix. All referenced endpoints must be inREADYstatus.Header-Based— routes by matching HTTP request headers.Path-Based— routes by matching the full URL path.
Initial status of the rule.
example
ActiveRouting configuration.
Responses
200Routing rule details.
example
200example
Success