> Documentation index for AI agents: https://docs.pagerduty.com/llms.txt

# Get the Router for an Event Orchestration

`GET https://api.pagerduty.com/event_orchestrations/{id}/router`

Get a Global Orchestration's Routing Rules.

An Orchestration Router allows you to create a set of Event Rules. The Router evaluates Events you send to this Global Orchestration against each of its rules, one at a time, and routes the event to a specific Service based on the first rule that matches. If an event doesn't match any rules, it'll be sent to service specified in as the `catch_all` or the "Unrouted" Orchestration if no service is specified.

For more information see the [API Concepts Document](https://docs.pagerduty.com/developer/api-concepts#event-orchestrations)

Scoped OAuth requires: `event_orchestrations.read`

## Authorization

- **api_key** (apiKey) — `Authorization` header. The API Key with format `Token token=<API_KEY>`

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | The ID of an Event Orchestration. |

## Header parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `Accept` | string | yes | The `Accept` header is used as a versioning header. Default: `application/vnd.pagerduty+json;version=2`. |

## Response 200

The Orchestration Router object.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `orchestration_path` | object | yes |  |
| `orchestration_path.type` |  |  | Indicates that these are a "router" type set of rules. Default: `router`. |
| `orchestration_path.parent` | object |  |  |
| `orchestration_path.parent.id` |  |  | ID of the Global Event Orchestration this Router belongs to. |
| `orchestration_path.parent.type` |  |  | One of: `event_orchestration_reference`. |
| `orchestration_path.sets` |  |  | The Router contains a single set of rules (the "start" set). The Router evaluates Events against these Rules, one at a time, and routes each Event to a specific Service based on the first rule that matches. Min items: 1. Max items: 1. |
| `orchestration_path.catch_all` | object |  | When none of the rules match an event, the event will be routed according to the catch_all settings. |
| `orchestration_path.catch_all.actions` | object |  |  |
| `orchestration_path.catch_all.actions.route_to` | string |  | With a value of 'unrouted', all events are sent to the Unrouted Orchestration. Default: `unrouted`. |

Example: Example Response

```json
{
  "orchestration_path": {
    "type": "router",
    "parent": {
      "id": "b02e973d-9620-4e0a-9edc-00fedf7d4694",
      "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694",
      "type": "event_orchestration_reference"
    },
    "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694/router",
    "sets": [
      {
        "id": "start",
        "rules": [
          {
            "label": "Events relating to our relational database",
            "id": "1c26698b",
            "conditions": [
              {
                "expression": "event.summary matches part 'database'"
              },
              {
                "expression": "event.source matches regex 'db[0-9]+-server'"
              }
            ],
            "actions": {
              "route_to": "PB31XBA"
            }
          },
          {
            "label": "Events relating to our www app server",
            "id": "d9801904",
            "conditions": [
              {
                "expression": "event.summary matches part 'www'"
              }
            ],
            "actions": {
              "route_to": "PC2D9ML"
            }
          }
        ]
      }
    ],
    "catch_all": {
      "actions": {
        "route_to": "unrouted"
      }
    },
    "created_at": "2021-11-18T16:42:01Z",
    "created_by": {
      "id": "P8B9WR8",
      "self": "https://api.pagerduty.com/users/P8B9WR8",
      "type": "user_reference"
    },
    "updated_at": "2021-11-18T16:42:01Z",
    "updated_by": {
      "id": "P8B9WR8",
      "self": "https://api.pagerduty.com/users/P8B9WR8",
      "type": "user_reference"
    },
    "version": "9co0z4b152oICsoV91_PW2.ww8ip_xap"
  }
}
```

## Response 400

Caller provided invalid arguments. Please review the response for error details. Retrying with the same arguments will *not* work.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 401

Caller did not supply credentials or did not provide the correct credentials.
If you are using an API key, it may be invalid or your Authorization header may be malformed.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 403

Caller is not authorized to view the requested resource.
While your authentication is valid, the authenticated user or token does not have permission to perform this action.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 404

The requested resource was not found.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Developer Agreement

Your access to and use of the PagerDuty Developer Services is governed by the [PagerDuty Developer Agreement](https://docs.pagerduty.com/developer/pagerduty-developer-agreement).
