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

# List rules

`GET https://app.pagerduty.com/integration-jira-service/rules`

Returns a list of rules.

## Authorization

- **BearerToken** (http) — HTTP bearer. PagerDuty OAuth user Access Token The developer should obtain a valid user-based bearer token by performing Classic User OAuth by following our public documentation: https://developer.pagerduty.com/docs/b2a19cce2867a-classic-user-o-auth

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `total` | boolean |  | Returns the total number of records matched by the query if enabled. Default: `false`. |
| `limit` | integer |  | Set the maximum number of results matched by the query. Default: `25`. Minimum: 1. Maximum: 100. |
| `offset` | integer |  | The number of items to skip before starting to collect the result set. Default: `0`. Minimum: 0. |

## Header parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `x-pagerduty-jira-signature` | string | yes | Connected Jira instance signature token This header contains a signature token that validates the connection between PagerDuty and a specific Jira instance. It must be included in all API requests. > ### Obtaining the signature token > > 1. Send an authenticated GET request to your Jira instance: `GET /plugins/servlet/pagerduty/sign` > > 2. The endpoint returns a JSON response containing the signature: `{ "signature": "eyJ0eXAiOiJK..." }` > > 3. Use the returned signature value in the x-pagerduty-jira-signature header for all subsequent API calls. Note: Signature token is valid for 15 minutes after generation. |

## Response 200

A paginated list of rules.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `offset` | integer | yes | Echoes offset pagination property. Read-only. Default: `0`. |
| `limit` | integer | yes | Echoes limit pagination property. Read-only. Default: `25`. Minimum: 0. Maximum: 100. |
| `more` | boolean | yes | Indicates if there are additional records to return. Read-only. Default: `false`. |
| `total` | integer \| null | yes | The total number of records matching the given query. Read-only. Default: `null`. |
| `rules` | array of object | yes |  |
| `rules[].name` | string | yes | A name of the rule. Max length: 128. |
| `rules[].enabled` | boolean | yes | Indicates if the rule is enabled. Default: `false`. |
| `rules[].config` | object | yes | Contatins an object which describes a rule. |
| `rules[].config.sync_comments` | boolean |  | Indicates if comments should be synchronized. Default: `false`. |
| `rules[].config.services` | array of object |  | An array of the PagerDuty services. Min items: 1. |
| `rules[].config.services[].id` | string | yes |  |
| `rules[].config.services[].summary` | string |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. |
| `rules[].config.services[].type` | string | yes | One of: `service_reference`. |
| `rules[].config.services[].self` | string (url) |  | The API show URL at which the object is accessible. |
| `rules[].config.services[].html_url` | string \| null (url) |  | A URL at which the entity is uniquely displayed in the Web app. |
| `rules[].config.projects` | array of object \| null |  | An array of Jira projects. Min items: 1. |
| `rules[].config.projects[].id` | string | yes |  |
| `rules[].config.projects[].key` | string | yes |  |
| `rules[].config.projects[].label` | string | yes |  |
| `rules[].config.projects[].icon` | string (url) | yes |  |
| `rules[].config.projects[].html_url` | string (url) | yes |  |
| `rules[].config.issue_types` | array of object \| null |  | An array of Jira issue types. Min items: 1. |
| `rules[].config.issue_types[].id` | string | yes |  |
| `rules[].config.issue_types[].label` | string | yes |  |
| `rules[].config.issue_types[].icon` | string (url) | yes |  |
| `rules[].config.autocreate_issues` | boolean |  | Indicates if automatic Jira issue creation is enabled. Default: `false`. |
| `rules[].config.autocreate_issues_config` | array of object |  | An array of rules that are applied when automatic Jira issue creation is enabled. |
| `rules[].config.autocreate_issues_config[].condition` | object |  |  |
| `rules[].config.autocreate_issues_config[].condition.pd_events` | array of string |  | A list of PagerDuty incident actions which should be matched to create a Jira issue. |
| `rules[].config.autocreate_issues_config[].condition.pd_priorities` | array of object |  | A list of PagerDuty priorities that should be matched to create/update a Jira issue. |
| `rules[].config.autocreate_issues_config[].condition.pd_priorities[].id` | string | yes |  |
| `rules[].config.autocreate_issues_config[].condition.pd_priorities[].summary` | string |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. |
| `rules[].config.autocreate_issues_config[].condition.pd_priorities[].type` | string | yes | One of: `priority_reference`. |
| `rules[].config.autocreate_issues_config[].condition.pd_priorities[].self` | string (url) |  | The API show URL at which the object is accessible. |
| `rules[].config.autocreate_issues_config[].condition.pd_priorities[].html_url` | string \| null (url) |  | A URL at which the entity is uniquely displayed in the Web app. |
| `rules[].config.autocreate_issues_config[].condition.pd_urgency` | string \| null |  | A PagerDuty urgency that should be matched to create/update a Jira issue. One of: `high`, `low`. |
| `rules[].config.autocreate_issues_config[].actions` | array of object |  | Actions that applied when the rule will be executed. |
| `rules[].config.autocreate_issues_config[].actions_params` | object |  | Configuration of actions that applied when the rule will be executed. |
| `rules[].config.autocreate_issues_config[].target_project` | object \| null |  | Jira Project. |
| `rules[].config.autocreate_issues_config[].target_project.id` | string | yes |  |
| `rules[].config.autocreate_issues_config[].target_project.key` | string | yes |  |
| `rules[].config.autocreate_issues_config[].target_project.label` | string | yes |  |
| `rules[].config.autocreate_issues_config[].target_project.icon` | string (url) | yes |  |
| `rules[].config.autocreate_issues_config[].target_project.html_url` | string (url) | yes |  |
| `rules[].config.autocreate_issues_config[].target_issue_type` | object \| null |  | Jira Issue Type. |
| `rules[].config.autocreate_issues_config[].target_issue_type.id` | string | yes |  |
| `rules[].config.autocreate_issues_config[].target_issue_type.label` | string | yes |  |
| `rules[].config.autocreate_issues_config[].target_issue_type.icon` | string (url) | yes |  |
| `rules[].config.autocreate_incidents` | boolean |  | Indicates if automatic PagerDuty incident creation is enabled. Default: `false`. |
| `rules[].config.autocreate_incidents_config` | array of object |  | An array of rules that are applied when automatic PagerDuty incident creation is enabled. |
| `rules[].config.autocreate_incidents_config[].jql` | string | yes | Rule will be applied, when issue matches the JQL. |
| `rules[].config.autocreate_incidents_config[].on_create` | boolean |  | Apply the rule on issue creation. Default: `false`. |
| `rules[].config.autocreate_incidents_config[].on_update` | boolean |  | Apply the rule on issue update. Default: `false`. |
| `rules[].config.autocreate_incidents_config[].actions` | array of object |  | Actions that applied when the rule will be executed. |
| `rules[].config.autocreate_incidents_config[].actions_params` | object |  | Configuration of actions that applied when the rule will be executed. |
| `rules[].config.autocreate_incidents_config[].target_service` | object |  | The reference to the service. |
| `rules[].config.autocreate_incidents_config[].target_service.id` | string | yes |  |
| `rules[].config.autocreate_incidents_config[].target_service.summary` | string |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. |
| `rules[].config.autocreate_incidents_config[].target_service.type` | string | yes | One of: `service_reference`. |
| `rules[].config.autocreate_incidents_config[].target_service.self` | string (url) |  | The API show URL at which the object is accessible. |
| `rules[].config.autocreate_incidents_config[].target_service.html_url` | string \| null (url) |  | A URL at which the entity is uniquely displayed in the Web app. |
| `rules[].config.react_on_incident_event` | boolean |  | Indicates if reaction on PagerDuty incident updates is enabled. Default: `false`. |
| `rules[].config.react_on_incident_event_config` | array of object |  | An array of rules that are applied to the Jira issue when reaction on PagerDuty incident updates is enabled. |
| `rules[].config.react_on_incident_event_config[].condition` | object |  |  |
| `rules[].config.react_on_incident_event_config[].condition.pd_events` | array of string |  | A list of PagerDuty incident actions which should be matched to update a Jira issue. |
| `rules[].config.react_on_incident_event_config[].condition.pd_priorities` | array of object |  | A list of PagerDuty priorities that should be matched to create/update a Jira issue. Same fields as `rules[].config.autocreate_issues_config[].condition.pd_priorities` above. |
| `rules[].config.react_on_incident_event_config[].condition.pd_urgency` | string \| null |  | A PagerDuty urgency that should be matched to create/update a Jira issue. One of: `high`, `low`. |
| `rules[].config.react_on_incident_event_config[].actions` | array of object |  | Actions that applied when the rule will be executed. |
| `rules[].config.react_on_incident_event_config[].actions_params` | object |  | Configuration of actions that applied when the rule will be executed. |
| `rules[].config.react_on_incident_event_config[].target_project` | object \| null |  | Jira Project. Same fields as `rules[].config.autocreate_issues_config[].target_project` above. |
| `rules[].config.react_on_incident_event_config[].target_issue_type` | object |  | Issue Type, which should set on the issue. |
| `rules[].config.react_on_incident_event_config[].target_issue_type.id` | string | yes |  |
| `rules[].config.react_on_incident_event_config[].target_issue_type.label` | string | yes |  |
| `rules[].config.react_on_incident_event_config[].target_issue_type.icon` | string (url) | yes |  |
| `rules[].config.react_on_issue_status_change` | boolean |  | Indicates if reaction on Jira issue status change is enabled. Default: `false`. |
| `rules[].config.react_on_issue_status_change_config` | array of object |  | An array of rules that are applied to the PagerDuty incident when reaction on Jira issue status change is enabled. |
| `rules[].config.react_on_issue_status_change_config[].jira_statuses` | array of object |  |  |
| `rules[].config.react_on_issue_status_change_config[].jira_statuses[].id` | string | yes |  |
| `rules[].config.react_on_issue_status_change_config[].jira_statuses[].label` | string |  |  |
| `rules[].config.react_on_issue_status_change_config[].actions` | array of object |  | Actions that applied when the rule will be executed. |
| `rules[].config.react_on_issue_status_change_config[].actions_params` | object |  | Configuration of actions that applied when the rule will be executed. |
| `rules[].created_at` | string (date-time) | yes | The date/time rule was created. Read-only. |

Example: Response Example

```json
{
  "rules": [
    {
      "name": "Sample Rule",
      "enabled": true,
      "created_at": "2020-06-02T12:42:37Z",
      "config": {
        "sync_comments": true,
        "services": [
          {
            "id": "PLW70S2",
            "type": "service_reference",
            "label": "Jira Integration",
            "html_url": "https://subdomain.pagerduty.com/service-directory/PLW70S2"
          },
          {
            "id": "PR5R1T1",
            "type": "service_reference",
            "label": "Jira Performance Tests",
            "html_url": "https://subdomain.pagerduty.com/service-directory/PR5R1T1"
          }
        ],
        "projects": [
          {
            "key": "PD",
            "id": "10000",
            "label": "PagerDuty",
            "html_url": "http://jira.example.com/projects/PD",
            "icon": "http://jira.example.com/secure/projectavatar?avatarId=10324"
          },
          {
            "key": "HD",
            "id": "10001",
            "label": "Helpdesk",
            "html_url": "http://jira.example.com/projects/HD",
            "icon": "http://jira.example.com/secure/projectavatar?avatarId=10324"
          }
        ],
        "issue_types": [
          {
            "id": "10002",
            "icon": "http://jira.example.com/images/icons/issuetypes/story.svg",
            "label": "Story"
          },
          {
            "id": "10003",
            "icon": "http://jira.example.com/secure/viewavatar?size=xsmall&avatarId=10318&avatarType=issuetype",
            "label": "Task"
          },
          {
            "id": "10004",
            "icon": "http://jira.example.com/secure/viewavatar?size=xsmall&avatarId=10303&avatarType=issuetype",
            "label": "Bug"
          }
        ],
        "autocreate_incidents": true,
        "autocreate_incidents_config": [
          {
            "jql": "issuetype=Bug",
            "on_create": true,
            "on_update": true,
            "target_service": {
              "id": "PR5R1T1",
              "type": "service_reference"
            },
            "actions": [
              {
                "key": "jira_field_set_priority",
                "label": "Set Priority",
                "icon": "jira",
                "isDisabled": false
              },
              {
                "key": "jira_field_set_labels",
                "label": "Set Labels",
                "icon": "jira",
                "isDisabled": false
              },
              {
                "key": "pd_set_priority",
                "label": "Set Incident Priority",
                "icon": "pd",
                "isDisabled": false
              }
            ],
            "actions_params": {
              "jira_field_set_priority": {
                "label": "Highest",
                "icon": "http://jira.example.com/images/icons/priorities/highest.svg",
                "name": "Highest",
                "id": "1"
              },
              "jira_field_set_labels": [
                {
                  "label": "Service name",
                  "icon": "pd",
                  "key": "incident.service.summary"
                }
              ],
              "pd_set_priority": {
                "id": "PZQ39X0",
                "type": "priority_reference",
                "label": "P1",
                "html_url": null,
                "icon": "rect_color_ff4500"
              }
            }
          },
          {
            "jql": "issuetype=Story",
            "on_create": true,
            "on_update": true,
            "target_service": {
              "id": "PR5R1T1",
              "type": "service_reference"
            },
            "actions": [
              {
                "key": "jira_field_set_labels",
                "label": "Set Labels",
                "icon": "jira",
                "isDisabled": false
              },
              {
                "key": "pd_set_priority",
                "label": "Set Incident Priority",
                "icon": "pd",
                "isDisabled": false
              }
            ],
            "actions_params": {
              "jira_field_set_labels": [
                {
                  "label": "LinkedToPagerduty",
                  "key": "LinkedToPagerduty",
                  "icon": "text"
                }
              ],
              "pd_set_priority": {
                "id": "PCNJ47O",
                "type": "priority_reference",
                "label": "P4",
                "html_url": null,
                "icon": "rect_color_76ec7f"
              }
            }
          }
        ],
        "autocreate_issues": true,
        "autocreate_issues_config": [
          {
            "condition": {
              "pd_events": [
                "incident.trigger",
                "incident.acknowledge",
                "incident.unacknowledge",
                "incident.resolve",
                "incident.escalate",
                "incident.assign",
                "incident.delegate",
                "incident.trigger_manually"
              ],
              "pd_urgency": "high",
              "pd_priorities": []
            },
            "target_project": null,
            "target_issue_type": null,
            "actions": [
              {
                "key": "jira_append_description",
                "label": "Add description",
                "icon": "jira",
                "isDisabled": false
              }
            ],
            "actions_params": {
              "jira_append_description": [
                {
                  "label": "Incident title",
                  "icon": "pd",
                  "key": "incident.title"
                },
                {
                  "label": "Incident number",
                  "icon": "pd",
                  "key": "incident.incident_number"
                },
                {
                  "label": "Incident ID",
                  "icon": "pd",
                  "key": "incident.id"
                },
                {
                  "label": "Description",
                  "icon": "pd",
                  "key": "log_entries.channel.details"
                },
                {
                  "label": "Status",
                  "icon": "pd",
                  "key": "incident.status"
                },
                {
                  "label": "Created At",
                  "icon": "pd",
                  "key": "incident.created_at"
                },
                {
                  "label": "Service name",
                  "icon": "pd",
                  "key": "incident.service.summary"
                },
                {
                  "label": "Escalation policy name",
                  "icon": "pd",
                  "key": "incident.escalation_policy.summary"
                },
                {
                  "label": "Impacted services",
                  "icon": "pd",
                  "key": "incident.impacted_services.name"
                },
                {
                  "label": "Incident URL",
                  "icon": "pd",
                  "key": "incident.html_url"
                },
                {
                  "label": "Acknowledgements",
                  "icon": "pd",
                  "key": "incident.acknowledgements.acknowledger.name"
                },
                {
                  "label": "Urgency",
                  "icon": "pd",
                  "key": "incident.urgency"
                },
                {
                  "label": "Incident assignee",
                  "icon": "pd",
                  "key": "incident.assignee"
                },
                {
                  "label": "Priority",
                  "icon": "pd",
                  "key": "incident.priority.summary"
                },
                {
                  "label": "Last changed by",
                  "icon": "pd",
                  "key": "incident.last_status_change_by.summary"
                },
                {
                  "label": "Last changed at",
                  "icon": "pd",
                  "key": "incident.last_status_change_at"
                },
                {
                  "label": "And my custom text",
                  "key": "And my custom text",
                  "icon": "text"
                }
              ]
            }
          },
          {
            "condition": {
              "pd_events": [
                "incident.trigger"
              ],
              "pd_urgency": "high",
              "pd_priorities": [
                {
                  "id": "PZQ39X0",
                  "type": "priority_reference",
                  "label": "P1",
                  "html_url": null,
                  "icon": "rect_color_ff4500"
                },
                {
                  "id": "POV67SK",
                  "type": "priority_reference",
                  "label": "P2",
                  "html_url": null,
                  "icon": "rect_color_f59331"
                }
              ]
            },
            "target_project": {
              "key": "HD",
              "id": "10001",
              "label": "Helpdesk",
              "html_url": "http://jira.example.com/projects/HD",
              "icon": "http://jira.example.com/secure/projectavatar?avatarId=10324"
            },
            "target_issue_type": {
              "id": "10004",
              "icon": "http://jira.example.com/secure/viewavatar?size=xsmall&avatarId=10303&avatarType=issuetype",
              "label": "Bug"
            },
            "actions": [
              {
                "key": "jira_field_set_priority",
                "label": "Set Priority",
                "icon": "jira",
                "isDisabled": false
              }
            ],
            "actions_params": {
              "jira_field_set_priority": {
                "label": "Highest",
                "icon": "http://jira.example.com/images/icons/priorities/highest.svg",
                "name": "Highest",
                "id": "1"
              }
            }
          },
          {
            "condition": {
              "pd_events": [
                "incident.trigger"
              ],
              "pd_urgency": "low",
              "pd_priorities": [
                {
                  "id": "P0A95OH",
                  "type": "priority_reference",
                  "label": "P3",
                  "html_url": null,
                  "icon": "rect_color_359d54"
                },
                {
                  "id": "PCNJ47O",
                  "type": "priority_reference",
                  "label": "P4",
                  "html_url": null,
                  "icon": "rect_color_76ec7f"
                },
                {
                  "id": "PRSM238",
                  "type": "priority_reference",
                  "label": "P5",
                  "html_url": null,
                  "icon": "rect_color_f4f4f4"
                }
              ]
            },
            "target_project": null,
            "target_issue_type": {
              "id": "10004",
              "icon": "http://jira.example.com/secure/viewavatar?size=xsmall&avatarId=10303&avatarType=issuetype",
              "label": "Bug"
            },
            "actions": [
              {
                "key": "jira_field_set_priority",
                "label": "Set Priority",
                "icon": "jira",
                "isDisabled": false
              }
            ],
            "actions_params": {
              "jira_field_set_priority": {
                "label": "Low",
                "icon": "http://jira.example.com/images/icons/priorities/low.svg",
                "name": "Low",
                "id": "4"
              }
            }
          }
        ],
        "react_on_incident_event": true,
        "react_on_incident_event_config": [
          {
            "condition": {
              "pd_events": [
                "incident.acknowledge"
              ],
              "pd_urgency": "high",
              "pd_priorities": []
            },
            "actions": [
              {
                "key": "jira_change_status",
                "label": "Change Jira issue status to",
                "icon": "jira",
                "isDisabled": false
              }
            ],
            "actions_params": {
              "jira_change_status": {
                "id": "3",
                "label": "In Progress"
              }
            }
          },
          {
            "condition": {
              "pd_events": [
                "incident.unacknowledge"
              ],
              "pd_urgency": "high",
              "pd_priorities": []
            },
            "actions": [
              {
                "key": "jira_change_status",
                "label": "Change Jira issue status to",
                "icon": "jira",
                "isDisabled": false
              }
            ],
            "actions_params": {
              "jira_change_status": {
                "id": "10000",
                "label": "To Do"
              }
            }
          },
          {
            "condition": {
              "pd_events": [
                "incident.resolve"
              ],
              "pd_urgency": "high",
              "pd_priorities": []
            },
            "actions": [
              {
                "key": "jira_change_status",
                "label": "Change Jira issue status to",
                "icon": "jira",
                "isDisabled": false
              }
            ],
            "actions_params": {
              "jira_change_status": {
                "id": "10001",
                "label": "Done"
              }
            }
          },
          {
            "condition": {
              "pd_events": [
                "incident.assign"
              ],
              "pd_urgency": "high",
              "pd_priorities": []
            },
            "actions": [
              {
                "key": "jira_field_set_assignee",
                "label": "Set Assignee",
                "icon": "jira",
                "isDisabled": false
              }
            ],
            "actions_params": {
              "jira_field_set_assignee": {
                "label": "Incident assignee",
                "icon": "pd",
                "key": "incident.assignee"
              }
            }
          }
        ],
        "react_on_issue_status_change": true,
        "react_on_issue_status_change_config": [
          {
            "jira_statuses": [
              {
                "id": "3",
                "label": "In Progress"
              }
            ],
            "actions": [
              {
                "key": "pd_acknowledge",
                "label": "Acknowledge Incident",
                "icon": "pd",
                "isDisabled": false
              }
            ]
          },
          {
            "jira_statuses": [
              {
                "id": "10001",
                "label": "Done"
              }
            ],
            "actions": [
              {
                "key": "pd_resolve",
                "label": "Resolve Incident",
                "icon": "pd",
                "isDisabled": false
              }
            ]
          },
          {
            "jira_statuses": [
              {
                "id": "10000",
                "label": "To Do"
              }
            ],
            "actions": [
              {
                "key": "pd_add_responders",
                "label": "Add responders",
                "icon": "pd",
                "isDisabled": false
              }
            ],
            "actions_params": {
              "pd_add_responders": [
                {
                  "id": "PDU13T4",
                  "type": "user_reference",
                  "email": "user1@example.com",
                  "label": "User 1",
                  "html_url": "https://subdomain.pagerduty.com/users/PDU13T4",
                  "icon": "https://pd-static-assets.pagerduty.com/users/blank-avatar.png"
                },
                {
                  "id": "PKH7YP2",
                  "type": "user_reference",
                  "email": "user2@example.com",
                  "label": "User 2",
                  "html_url": "https://subdomain.pagerduty.com/users/PKH7YP2",
                  "icon": "https://pd-static-assets.pagerduty.com/users/blank-avatar.png"
                }
              ]
            }
          }
        ]
      }
    }
  ],
  "limit": 1,
  "offset": 0,
  "more": true,
  "total": 99
}
```

## 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 | yes |  |
| `error.message` | string | yes | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

Example: Authorization Error

```json
{
  "error": {
    "message": "Authorization error"
  }
}
```

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