---
title: "Retrieve a routing rule"
method: GET
path: "/v2/routing-rules/{routing_rule_id}"
tags: ["Routing Rules"]
---

# Retrieve a routing rule

`GET /v2/routing-rules/{routing_rule_id}`

## Request

- Base URL: `https://my.orq.ai`
- URL: `https://my.orq.ai/v2/routing-rules/{routing_rule_id}`
- Auth: HTTP bearer

Retrieves a routing rule by its unique identifier.

## Path parameters

- `routing_rule_id` string, required

## Response `200`

OK

- RoutingRule
  - `_id` string, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `created_by_id` string, required
  - `updated_by_id` string, required
  - `project_id` string, required: Project that contains the rule. Empty for workspace-wide rules.
  - `display_name` string, required: Human-readable routing-rule name.
  - `description` string, required
  - `enabled` boolean, required
  - `expression` RoutingRuleExpression
    - `config` object
    - `cel` string: CEL expression used to match requests. Empty means the rule always matches.
  - `models_config` RoutingRuleModelsConfig
    - `mode` string: Load-balancing mode.
    - `models` RoutingRuleModel[]
      - `model` string
      - `display_name` string
      - `weight` number, double
      - `integration_id` string
    - `fallback_on_codes` integer[]: HTTP error status codes that trigger fallback. Only allowed in fallback mode. Empty uses the default: 408, 429, 500, 502, 503, 504, 529.
  - `plugins` RoutingRulePlugin[], required
    - `id` string: Plugin discriminator.
    - `language` string: Languages, regions and entity types are checked against the live pii-detection capabilities catalog when the rule is saved, not pinned here, so a language or region the detector gains becomes writable without a future update.
    - `entities` string[]: Entity types to redact. On their own a strict allowlist; alongside regions they add to the region coverage.
    - `on_failure` string
    - `threshold` number, double
    - `mask` string[]
    - `regions` string[]: Regions of coverage by ISO 3166-1 alpha-2 code, or ["all"]. Combines with entities: the two selections are unioned.
    - `entity_thresholds` object: Per-entity-type confidence cutoff. Every key must also appear in entities.
    - `models_config` RoutingRuleModelsConfig
      - `mode` string: Load-balancing mode.
      - `models` RoutingRuleModel[]
        - `model` string
        - `display_name` string
        - `weight` number, double
        - `integration_id` string
      - `fallback_on_codes` integer[]: HTTP error status codes that trigger fallback. Only allowed in fallback mode. Empty uses the default: 408, 429, 500, 502, 503, 504, 529.
    - `checks` object
  - `priority` integer, required: Evaluation order. Lower values are evaluated first.
  - `cache_config` RoutingRuleCacheConfig
    - `ttl` integer, required: Cache time to live in seconds. Maximum 259200 seconds (3 days).

## Other responses

- `401`: Authentication required. See https://docs.orq.ai/reference/errors for the error codes.
- `403`: Not permitted for this key, project or workspace. See https://docs.orq.ai/reference/errors for the error codes.

## Changes

> 554 revisions in range; 71 not diffed.

- **2026-10-23** `0b4e519a544f`: 5 info
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
  - added the optional property `models_config/fallback_on_codes` to the response with the `200` status
  - added the optional property `plugins/items/checks` to the response with the `200` status
  - …1 more
- **2026-10-23** `732aed62833a`: 3 warning, 2 info
  - removed the optional property `models_config/fallback_on_codes` from the response with the `200` status
  - removed the optional property `plugins/items/checks` from the response with the `200` status
  - removed the optional property `plugins/items/models_config` from the response with the `200` status
  - removed the non-success response with the status `401`
  - …1 more
- **2026-10-22** `4f826b2c3a0e`: 5 info
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
  - added the optional property `models_config/fallback_on_codes` to the response with the `200` status
  - added the optional property `plugins/items/checks` to the response with the `200` status
  - …1 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/orq-ai/apis/orq-ai-api/changes/v2/routing-rules/:routing_rule_id/get.md)

---

[API](https://skmtc.dev/orq-ai/apis/orq-ai-api.md) - [All operations](https://skmtc.dev/orq-ai/apis/orq-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/orq-ai/apis/orq-ai-api/revisions/928a71e92252?raw)
