Skip to main content
Effective Date — May 7, 2026
As part of the IAM hierarchy simplification, a new format of the TIR APIs is now available. All endpoints that previously included /teams/:team_id segment will now follow a service-centric structure, with project_id now passed as a query parameter instead of a path segment. You can read more about this change

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_idPathintegerrequired

    Gateway ID

Query parameters

  • project_idQueryintegerrequired

    Project ID

  • locationQuerystringrequired

    Location

  • active_iamQueryintegeroptional

    Active IAM ID (To access contact person account) Find your Active IAM ID here

Request body

application/json

object
route_namestringrequired

Name of the routing rule. Must be unique within the gateway.

examplellama-route
routing_strategystringrequiredWeight-Based | Prefix-Based | Header-Based

Traffic routing strategy.

  • Weight-Based — distributes traffic by weight across endpoints.
  • Prefix-Based — routes by URL path prefix. All referenced endpoints must be in READY status.
  • Header-Based — routes by matching HTTP request headers.
  • Path-Based — routes by matching the full URL path.
statusstringActive | Inactive

Initial status of the rule.

exampleActive
rulesobject

Routing configuration.

Responses

200Routing rule details.
object
codeinteger
example200
dataobject
errorsobject
messagestring
exampleSuccess