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

# Update the Unrouted Orchestration for an Event Orchestration

`PUT https://api.pagerduty.com/event_orchestrations/{id}/unrouted`

Update a Global Event Orchestration's Rules for Unrouted events.

An Unrouted Orchestration allows you to create a set of Event Rules that will be evaluated against all events that don't match any rules in the Global Orchestration's Router. Events that reach the Unrouted Orchestration will never be routed to a specific Service.

The Unrouted Orchestration evaluates Events sent to it against each of its rules, beginning with the rules in the "start" set. When a matching rule is found, it can modify and enhance the event and can route the event to another set of rules within this Unrouted Orchestration for further processing.

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

Scoped OAuth requires: `event_orchestrations.write`

## 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`. |

## Request body (`application/json`)

Updates to Unrouted Orchestration rules. Omitted rules and rule details are deleted.

| Field | Type | Required | Description |
|---|---|---|---|
| `orchestration_path` | object | yes |  |
| `orchestration_path.type` |  |  | Indicates that these are a "unrouted" type set of rules. Default: `unrouted`. |
| `orchestration_path.parent` | object |  |  |
| `orchestration_path.parent.id` |  |  | ID of the Global Event Orchestration this Unrouted Orchestration belongs to. |
| `orchestration_path.parent.type` |  |  | One of: `event_orchestration_reference`. |
| `orchestration_path.sets` |  |  | An Unrouted Orchestration must contain at least a "start" set, but can contain any number of additional sets that are routed to by other rules to form a directional graph. |
| `orchestration_path.catch_all` | object |  |  |
| `orchestration_path.catch_all.actions` | object |  |  |
| `orchestration_path.catch_all.actions.severity` | string |  | Set the severity of the resulting alert. One of: `info`, `error`, `warning`, `critical`. |
| `orchestration_path.catch_all.actions.event_action` | string |  | Set whether the resulting alert status is trigger or resolve. One of: `trigger`, `resolve`. |
| `orchestration_path.catch_all.actions.variables` | array of object |  | Populate variables from event payloads and use those variables in other event actions. |
| `orchestration_path.catch_all.actions.variables[].name` | string |  | The name of the variable. |
| `orchestration_path.catch_all.actions.variables[].path` | string |  | Path to a field in an event, in dot-notation. |
| `orchestration_path.catch_all.actions.variables[].type` | string |  | The type of operation to populate the variable. Currently only Regex-based variable extraction is supported. One of: `regex`. |
| `orchestration_path.catch_all.actions.variables[].value` | string |  | A RE2 regular expression. If it contains one or more capture groups, their values will be extracted and appended together. If it contains no capture groups, the whole match is used. |
| `orchestration_path.catch_all.actions.extractions` | array of one of: object \| object |  | Dynamically extract values to set and modify new and existing PD-CEF fields. |
| `orchestration_path.catch_all.actions.extractions[].target` | string |  | (option 1) The PD-CEF field that will be set with the value from the template. |
| `orchestration_path.catch_all.actions.extractions[].template` | string |  | (option 1) A value that will be used to populate the target PD-CEF field. You can include variables extracted from the payload by using string interpolation. |
| `orchestration_path.catch_all.actions.extractions[].target` | string |  | (option 2) The PD-CEF field that will be set with the value from the regex. |
| `orchestration_path.catch_all.actions.extractions[].regex` | string |  | (option 2) A RE2 regular expression. If it contains one or more capture groups, their values will be extracted and appended together. If it contains no capture groups, the whole match is used. |
| `orchestration_path.catch_all.actions.extractions[].source` | string |  | (option 2) The path to the event field where the regex will be applied to extract a value. |

Example: Example Request

```json
{
  "orchestration_path": {
    "sets": [
      {
        "id": "start",
        "rules": [
          {
            "label": "Update the summary of un-matched Critical alerts so they're easier to spot",
            "id": "38880ffb",
            "conditions": [
              {
                "expression": "event.severity matches 'critical'"
              }
            ],
            "actions": {
              "extractions": [
                {
                  "target": "event.summary",
                  "template": "[Critical Unrouted] {{event.summary}}"
                }
              ]
            }
          },
          {
            "label": "Reduce the severity of all other unrouted events",
            "id": "3896801e",
            "conditions": [],
            "actions": {
              "severity": "info"
            }
          }
        ]
      }
    ],
    "catch_all": {
      "actions": {
        "suppress": true
      }
    }
  }
}
```

## Response 200

The Unrouted Orchestration object.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `orchestration_path` | object | yes |  |
| `orchestration_path.type` |  |  | Indicates that these are a "unrouted" type set of rules. Default: `unrouted`. |
| `orchestration_path.parent` | object |  |  |
| `orchestration_path.parent.id` |  |  | ID of the Global Event Orchestration this Unrouted Orchestration belongs to. |
| `orchestration_path.parent.type` |  |  | One of: `event_orchestration_reference`. |
| `orchestration_path.sets` |  |  | An Unrouted Orchestration must contain at least a "start" set, but can contain any number of additional sets that are routed to by other rules to form a directional graph. |
| `orchestration_path.catch_all` | object |  |  |
| `orchestration_path.catch_all.actions` | object |  |  |
| `orchestration_path.catch_all.actions.severity` | string |  | Set the severity of the resulting alert. One of: `info`, `error`, `warning`, `critical`. |
| `orchestration_path.catch_all.actions.event_action` | string |  | Set whether the resulting alert status is trigger or resolve. One of: `trigger`, `resolve`. |
| `orchestration_path.catch_all.actions.variables` | array of object |  | Populate variables from event payloads and use those variables in other event actions. |
| `orchestration_path.catch_all.actions.variables[].name` | string |  | The name of the variable. |
| `orchestration_path.catch_all.actions.variables[].path` | string |  | Path to a field in an event, in dot-notation. |
| `orchestration_path.catch_all.actions.variables[].type` | string |  | The type of operation to populate the variable. Currently only Regex-based variable extraction is supported. One of: `regex`. |
| `orchestration_path.catch_all.actions.variables[].value` | string |  | A RE2 regular expression. If it contains one or more capture groups, their values will be extracted and appended together. If it contains no capture groups, the whole match is used. |
| `orchestration_path.catch_all.actions.extractions` | array of one of: object \| object |  | Dynamically extract values to set and modify new and existing PD-CEF fields. |
| `orchestration_path.catch_all.actions.extractions[].target` | string |  | (option 1) The PD-CEF field that will be set with the value from the template. |
| `orchestration_path.catch_all.actions.extractions[].template` | string |  | (option 1) A value that will be used to populate the target PD-CEF field. You can include variables extracted from the payload by using string interpolation. |
| `orchestration_path.catch_all.actions.extractions[].target` | string |  | (option 2) The PD-CEF field that will be set with the value from the regex. |
| `orchestration_path.catch_all.actions.extractions[].regex` | string |  | (option 2) A RE2 regular expression. If it contains one or more capture groups, their values will be extracted and appended together. If it contains no capture groups, the whole match is used. |
| `orchestration_path.catch_all.actions.extractions[].source` | string |  | (option 2) The path to the event field where the regex will be applied to extract a value. |
| `warnings` | array of one of: object |  | List of applicable warnings messages for each rule using a feature not available on your account plan. |
| `warnings[].message` | string |  | (option 1) A description of the warning and any potential side effects. |
| `warnings[].rule_id` | string |  | (option 1) The ID of the rule using the feature. |
| `warnings[].feature` | string |  | (option 1) The feature that the current account plan does not have access to. Example values include: * `threshold_condition` * `nested_rules` * `suspend` * `automation_actions` * `cache_variable:automation_actions` * `cache_variable:annotate` * `variables` * `interpolation:annotate` * `interpolation:extractions` * `interpolation:incident_custom_field_updates` * `suppress` * `incident_custom_field_updates` * `dynamic_route_to` * `escalation_policy` * `aiops_routing_mismatch` |
| `warnings[].feature_type` | string |  | (option 1) Specifies whether the feature is a part of the rule's conditions, or its actions. Example values include: * `conditions` * `actions` * `nested_rules` * `global_orchestrations` * `aiops_routing` For PDRP customers, this feature is branded **Signal Intelligence** in the PagerDuty product UI. The API field names and values (e.g. `aiops_routing_mismatch`, `aiops_routing`) are unchanged. |
| `warnings[].warning_type` | string |  | (option 1) The type of warning that is being returned for the rule. One of: `forbidden_feature`, `invalid_routing`. |

Example: Example Response

```json
{
  "orchestration_path": {
    "type": "unrouted",
    "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": "Update the summary of un-matched Critical alerts so they're easier to spot",
            "id": "38880ffb",
            "conditions": [
              {
                "expression": "event.severity matches 'critical'"
              }
            ],
            "actions": {
              "extractions": [
                {
                  "target": "event.summary",
                  "template": "[Critical Unrouted] {{event.summary}}"
                }
              ]
            }
          },
          {
            "label": "Reduce the severity of all other unrouted events",
            "id": "3896801e",
            "conditions": [],
            "actions": {
              "severity": "info"
            }
          }
        ]
      }
    ],
    "catch_all": {
      "actions": {
        "suppress": true
      }
    },
    "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": "aZO.EEf9zWb9Vg0NYq.Uqad1hOC2Maod"
  },
  "warnings": [
    {
      "feature": "extractions",
      "feature_type": "actions",
      "message": "This rule uses Dynamic Field Enrichment & Extraction, which is an action not available on your account plan. The rule will be updated, but the action will not be fired when the rule is evaluated",
      "rule_id": "3896801e",
      "warning_type": "forbidden_feature"
    }
  ]
}
```

## 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. |

## Response 405

The request was received and recognized by the server, but its HTTP method was rejected for the requested resource.

### `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 409

The request conflicts with the current state of the server.

### `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).
