Skip to content

pagerduty get-incident

Get an incident

Description

Get a PagerDuty incident

Synopsis

pagerduty get-incident
    --site <site>
    --id <id>

Arguments

site - (string)

     Site where this command will be executed
     Example: --site "site-1"
     Default: input.site      Attributes: required

id - (string)

     incident id
     Example: --id "id-1"
     Default: _None_      Attributes: required

Examples

Input:

x= !pagerduty get-incident --id "Q3O2DXG783FJFA"
Output:
{
  "incident": {
    "incident_number": 1,
    "title": "New test",
    "description": "New test",
    "created_at": "2022-11-08T12:44:38Z",
    "status": "triggered",
    "incident_key": "61f9ac0c0449478f92b514803a23b1f1",
    "service": {
      "id": "PKAT53N",
      "type": "service_reference",
      "summary": "TestForIMPL",
      "self": "https://api.pagerduty.com/services/PKAT53N",
      "html_url": "https://maira.pagerduty.com/service-directory/PKAT53N"
    },
    "assignments": [
      {
        "at": "2022-11-08T12:44:38Z",
        "assignee": {
          "id": "P56N7LQ",
          "type": "user_reference",
          "summary": "Pavan Subhakar",
          "self": "https://api.pagerduty.com/users/P56N7LQ",
          "html_url": "https://maira.pagerduty.com/users/P56N7LQ"
        }
      }
    ],
    "assigned_via": "direct_assignment",
    "last_status_change_at": "2022-11-11T10:55:08Z",
    "first_trigger_log_entry": {
      "id": "R5U3O7T9HQMY7G26BE5HBRY2K5",
      "type": "trigger_log_entry_reference",
      "summary": "Triggered through the website.",
      "self": "https://api.pagerduty.com/log_entries/R5U3O7T9HQMY7G26BE5HBRY2K5",
      "html_url": "https://maira.pagerduty.com/incidents/Q3O2DXG783FJFA/log_entries/R5U3O7T9HQMY7G26BE5HBRY2K5"
    },
    "alert_counts": { "all": 0, "triggered": 0, "resolved": 0 },
    "is_mergeable": true,
    "escalation_policy": {
      "id": "P6GPFJT",
      "type": "escalation_policy_reference",
      "summary": "Default",
      "self": "https://api.pagerduty.com/escalation_policies/P6GPFJT",
      "html_url": "https://maira.pagerduty.com/escalation_policies/P6GPFJT"
    },
    "teams": [],
    "impacted_services": [
      {
        "id": "PKAT53N",
        "type": "service_reference",
        "summary": "TestForIMPL",
        "self": "https://api.pagerduty.com/services/PKAT53N",
        "html_url": "https://maira.pagerduty.com/service-directory/PKAT53N"
      }
    ],
    "pending_actions": [],
    "acknowledgements": [],
    "basic_alert_grouping": null,
    "alert_grouping": null,
    "last_status_change_by": {
      "id": "PKAT53N",
      "type": "service_reference",
      "summary": "TestForIMPL",
      "self": "https://api.pagerduty.com/services/PKAT53N",
      "html_url": "https://maira.pagerduty.com/service-directory/PKAT53N"
    },
    "incidents_responders": [],
    "responder_requests": [],
    "subscriber_requests": [],
    "urgency": "low",
    "id": "Q3O2DXG783FJFA",
    "type": "incident",
    "summary": "[#1] New test",
    "self": "https://api.pagerduty.com/incidents/Q3O2DXG783FJFA",
    "html_url": "https://maira.pagerduty.com/incidents/Q3O2DXG783FJFA"
  }
}

Access Control

To use this command, you need access to the following:

Field Value
Action "read"
Service Type "pagerduty"
Service Instance
Namespace
Object Type "incident"
Object ID id

Please see Access Control for details.