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

# Get a Ruleset

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

Get a Ruleset.
<!-- theme: warning -->
> ### End-of-life
> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.

Rulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.

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

Scoped OAuth requires: `event_rules.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 the resource. |

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

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `ruleset` | object |  |  |
| `ruleset.id` | string |  | ID of the Ruleset. Read-only. |
| `ruleset.self` | string (url) |  | the API show URL at which the object is accessible. Read-only. |
| `ruleset.type` | string |  | Read-only. One of: `global`, `default_global`. |
| `ruleset.name` | string |  | Name of the Ruleset. |
| `ruleset.routing_keys` | array of string |  | Routing keys routed to this Ruleset. Read-only. |
| `ruleset.created_at` | string (date-time) |  | The date the Ruleset was created at. Read-only. |
| `ruleset.creator` | object |  | Reference to the user that has created the Ruleset. Read-only. |
| `ruleset.creator.id` | string |  | Read-only. |
| `ruleset.creator.type` | string |  | A string that determines the schema of the object. Read-only. |
| `ruleset.creator.self` | string (url) |  | The API show URL at which the object is accessible. Read-only. |
| `ruleset.updated_at` | string (date-time) |  | The date the Ruleset was last updated. Read-only. |
| `ruleset.updater` | object |  | Reference to the user that has updated the Ruleset last. Read-only. |
| `ruleset.updater.id` | string |  | Read-only. |
| `ruleset.updater.type` | string |  | A string that determines the schema of the object. Read-only. |
| `ruleset.updater.self` | string (url) |  | The API show URL at which the object is accessible. Read-only. |
| `ruleset.team` | object |  | Reference to the team that owns the Ruleset. If none is specified, only admins have access. |
| `ruleset.team.id` | string | yes |  |
| `ruleset.team.type` | string | yes | A string that determines the schema of the object. Read-only. |
| `ruleset.team.self` | string (url) |  | The API show URL at which the object is accessible. Read-only. |

Example: Response Example

```json
{
  "ruleset": {
    "id": "0e84de00-9511-4380-9f4f-a7b568bb49a0",
    "name": "MySQL Clusters",
    "type": "global",
    "routing_keys": [
      "R0212P1QXGEIQE2NMTQ7L7WXD00DWHIN"
    ],
    "self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0",
    "created_at": "2019-12-24T21:18:52Z",
    "creator": {
      "type": "user_reference",
      "self": "https://api.pagerduty.com/users/PABO808",
      "id": "PABO808"
    },
    "updated_at": "2019-12-25T14:54:23Z",
    "updater": {
      "type": "user_reference",
      "self": "https://api.pagerduty.com/users/PABO808",
      "id": "PABO808"
    },
    "team": {
      "type": "team_reference",
      "self": "https://api.pagerduty.com/teams/P3ZQXDF",
      "id": "P3ZQXDF"
    }
  }
}
```

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