---
title: "Get routing rule"
method: GET
path: "/api/governance/routing-rules/{rule_id}"
tags: ["Governance"]
---

# Get routing rule

`GET /api/governance/routing-rules/{rule_id}`

Returns a specific routing rule by ID.

## Path parameters

- `rule_id` string, required

## Response `200`

Successful response

- object
  - `rule` RoutingRule — Global scope routing rule
    - `id` string — Unique identifier for the routing rule
    - `name` string — Name of the routing rule
    - `description` string — Description of what the rule does
    - `enabled` boolean — Whether the rule is enabled and active
    - `cel_expression` string — CEL (Common Expression Language) expression for matching
    - `targets` object[] — Weighted routing targets; weights must sum to 1; target is selected probabilistically at request time
      - `provider` string, nullable — Target provider (omit or empty to use the incoming request provider)
      - `model` string, nullable — Target model (omit or empty to use the incoming request model)
      - `key_id` string, nullable — UUID of the API key to pin for this target (omit for load-balanced key selection)
      - `weight` number, double, required — Probability weight for this target (must be > 0; all target weights in a rule must sum to 1, e.g. 0.7 + 0.3 = 1.0)
    - `fallbacks` string[] — Fallback providers in format "provider/model"
    - `scope` 'global', required — Scope level for the rule
    - `scope_id` string, nullable — ID for the scope (empty for global scope)
    - `priority` integer — Priority for rule evaluation (lower number = higher priority)
    - `query` object, nullable — Visual rule tree structure from query builder
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `404` — Routing rule not found
- `500` — Internal server error

---

[API](https://skmtc.net/getbifrost/apis/bifrost-api.md) · [All operations](https://skmtc.net/getbifrost/apis/bifrost-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbifrost/bifrost-api/versions/f8cab88f64ea/schema)
