---
title: "Get routing rule"
method: GET
path: "/api/{cloudId}/v1/teams/{teamId}/routing-rules/{id}"
tags: ["Routing rules"]
---

# Get routing rule

`GET /api/{cloudId}/v1/teams/{teamId}/routing-rules/{id}`

Gets a routing rule with given id in the request.

## Path parameters

- `teamId` string, required
- `id` string, required

## Response `200`

Returned if the request is successful.

- RoutingRuleResponse
  - `id` string — Identifier of the routing rule.
  - `name` string — Name of the routing rule.
  - `isDefault` boolean — Indicates whether given routing rule is default or not.
  - `order` integer — The order of the team routing rule within the rules. Order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n).
  - `criteria` union — Defines the conditions that will be checked before applying routing rule and type of the operations that will be applied on conditions.
    - RoutingRulesMatchAllAnyConditionsFilter
      - `type` 'match-any-condition' | 'match-all-conditions', required — Type of the operation will be applied on conditions.
      - `conditions` RoutingRulesCondition[], required — List of conditions will be checked before applying team routing rule.
        - `field` 'message' | 'alias' | 'description' | 'source' | 'entity' | 'tags' | 'actions' | 'extra-properties' | 'priority' | 'details' | 'responders', required — Specifies which alert field will be used in condition.
        - `key` string — If field is set as extra-properties, key could be used for key-value pair.
        - `not` boolean — Indicates behaviour of the given operation.
        - `operation` 'matches' | 'contains' | 'starts-with' | 'ends-with' | 'equals' | 'contains-key' | 'contains-value' | 'greater-than' | 'less-than' | 'is-empty' | 'equals-ignore-whitespace', required — It is the operation that will be executed for the given field and key. Available operations changes according to the fields type: - String Operations: contains, equals, starts-with, ends-with, matches, is-empty, equals-ignore-whitespace - List Operations: contains, is-empty - Map Operations: contains, contains-key, contains-value, is-empty - Number Operations: matches, equals, greater-than, less-than - Boolean Operations: equals
        - `expectedValue` string — User defined value that will be compared with alert field according to the operation.
        - `order` integer — Order of the condition in conditions list.
    - RoutingRulesMatchAllFilter
      - `type` 'match-all', required — Type of the operation will be applied on conditions.
  - `timezone` string — Timezone of team routing rule. If timezone field is not given, account timezone is used as default.
  - `timeRestriction` union — Time interval that routing rule will work. It can be just one restriction which will be applied all days, or list of restrictions will be applied to the specified days.
    - RoutingRulesTimeOfDayTimeRestrictionInterval
      - `type` string, required — This parameter should be set **time-of-day** (day-based).
      - `restriction` RoutingRulesDayTimeRestriction, required — It is a restriction object.
        - `startHour` integer, required — Value of the hour that frame will start.
        - `endHour` integer, required — Value of the hour that frame will end.
        - `startMin` integer, required — Value of the minute that frame will start.
        - `endMin` integer, required — Value of the minute that frame will end.
    - RoutingRulesWeekdayTimeRestrictionInterval
      - `type` string, required — This parameter should be set **weekday-and-time-of-day** (week-based).
      - `restrictions` RoutingRulesWeekTimeRestriction[], required — It is a list of restriction objects.
        - `startDay` 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday', required
        - `endDay` 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday', required
        - `startHour` integer, required — Value of the hour that frame will start.
        - `endHour` integer, required — Value of the hour that frame will end.
        - `startMin` integer, required — Value of the minute that frame will start.
        - `endMin` integer, required — Value of the minute that frame will end.
  - `notify` Notify — Target entity of schedule, escalation, or the reserved word none which will be notified in routing rule.
    - `id` string — If type is **none**, id is not required.
    - `type` 'escalation' | 'schedule' | 'none', required

## Other responses

- `401` — Returned if the authentication credentials are incorrect.
- `403` — Returned if the user does not have permission see routing rule.
- `404` — Returned if routing rule owning team or routing rule are not found.

---

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