Resource

Incident

Manage incidents for your project

The Incident Model

Properties

  • Name
    _id
    Type
    Object ID
    Description

    ID of this object

  • Name
    createdAt
    Type
    Date
    Description

    Date and Time when the object was created.

  • Name
    updatedAt
    Type
    Date
    Description

    Date and Time when the object was updated.

  • Name
    project
    Type
    Project
    Description

    Relation to Project Resource in which this object belongs

  • Name
    projectId
    Type
    Object IDRequired
    Description

    ID of your Project in which this object belongs

  • Name
    title
    Type
    Long TextRequired
    Description

    Title of this incident

  • Name
    description
    Type
    Markdown
    Description

    Short description of this incident. This is in markdown and will be visible on the status page.

  • Name
    declaredAt
    Type
    DateRequired
    Description

    Date and time when this incident was declared.

  • Name
    slug
    Type
    SlugRequired
    Description

    Friendly globally unique name for your object

  • Name
    createdByUser
    Type
    User
    Description

    Relation to User who created this object (if this object was created by a User)

  • Name
    createdByUserId
    Type
    Object ID
    Description

    User ID who created this object (if this object was created by a User)

  • Name
    monitors
    Type
    Monitor
    Description

    List of monitors affected by this incident

  • Name
    onCallDutyPolicies
    Type
    On-Call Policy
    Description

    List of on-call duty policies affected by this incident.

  • Name
    labels
    Type
    Label
    Description

    Relation to Labels Array where this object is categorized in.

  • Name
    currentIncidentState
    Type
    Incident State
    Description

    Current state of this incident. Is the incident acknowledged? or resolved?. This is related to Incident State

  • Name
    currentIncidentStateId
    Type
    Object IDRequired
    Description

    Current Incident State ID

  • Name
    incidentSeverity
    Type
    Incident Severity
    Description

    How severe is this incident. Is it critical? or a minor incident?. This is related to Incident Severity.

  • Name
    incidentSeverityId
    Type
    Object IDRequired
    Description

    Incident Severity ID

  • Name
    changeMonitorStatusTo
    Type
    Incident State
    Description

    Relation to Monitor Status Object. All monitors connected to this incident will be changed to this status when the incident is created.

  • Name
    changeMonitorStatusToId
    Type
    Object ID
    Description

    Relation to Monitor Status Object ID. All monitors connected to this incident will be changed to this status when the incident is created.

  • Name
    subscriberNotificationStatusMessage
    Type
    Very Long Text
    Description

    Status message for subscriber notifications - includes success messages, failure reasons, or skip reasons

  • Name
    subscriberNotificationStatusMessageOnPostmortemPublished
    Type
    Very Long Text
    Description

    Status message for subscriber notifications on postmortem published - includes success messages, failure reasons, or skip reasons

  • Name
    shouldStatusPageSubscribersBeNotifiedOnIncidentCreated
    Type
    Boolean
    Description

    Should subscribers be notified about this incident?

  • Name
    customFields
    Type
    JSON
    Description

    Custom Fields on this resource.

  • Name
    rootCause
    Type
    Markdown
    Description

    What is the root cause of this incident?

  • Name
    postmortemNote
    Type
    Markdown
    Description

    Document the postmortem summary for this incident.

  • Name
    showPostmortemOnStatusPage
    Type
    Boolean
    Description

    Should the postmortem note and attachments be visible on the status page once published?

  • Name
    notifySubscribersOnPostmortemPublished
    Type
    Boolean
    Description

    Should subscribers be notified when the postmortem is published?

  • Name
    postmortemPostedAt
    Type
    Date
    Description

    Timestamp that will be shown alongside the published postmortem on the status page.

  • Name
    postmortemAttachments
    Type
    File
    Description

    Files that accompany the postmortem note and can be shared publicly when enabled.

  • Name
    createdStateLog
    Type
    JSON
    Description

  • Name
    createdCriteriaId
    Type
    Long Text
    Description

    If this incident was created by a Probe, this is the ID of the criteria that created it.

  • Name
    createdIncidentTemplateId
    Type
    Long Text
    Description

    If this incident was created by a Probe, this is the ID of the incident template that was used for creation.

  • Name
    createdByProbe
    Type
    Probe
    Description

    If this incident was created by a Probe, this is the probe that created it.

  • Name
    createdByProbeId
    Type
    Object ID
    Description

    If this incident was created by a Probe, this is the ID of the probe that created it.

  • Name
    isCreatedAutomatically
    Type
    Boolean
    Description

    Is this incident created by Probe or Workers automatically (and not created manually by a user)?

  • Name
    remediationNotes
    Type
    Markdown
    Description

    Notes on how to remediate this incident. This is in markdown.

  • Name
    telemetryQuery
    Type
    JSON
    Description

    Telemetry query for this incident

  • Name
    incidentNumber
    Type
    Number
    Description

    Incident Number

  • Name
    incidentNumberWithPrefix
    Type
    Text
    Description

    Incident number with prefix (e.g., 'INC-42' or '#42')

  • Name
    isVisibleOnStatusPage
    Type
    Boolean
    Description

    Should this incident be visible on the status page?

  • Name
    incidentEpisode
    Type
    Incident Episode
    Description

    Relation to Incident Episode this incident belongs to

  • Name
    incidentEpisodeId
    Type
    Object ID
    Description

    ID of the Incident Episode this incident belongs to

GETorPOST/api/incident/get-list

List

This endpoint allows you to retrieve a paginated list of all your Incident. By default, a maximum of ten Incident are shown per page.

Optional Query Params

  • limit
    number
    Number of objects to fetch. By default 10, you can increase this count up to 100
  • skip
    number
    Number of objects to skip. This can be useful in pagination

Optional Request Body

List Request

POST
/api/incident/get-list?skip=0&limit=10
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "select": {
    "currentIncidentStateId": true,
    "declaredAt": true,
    "incidentSeverityId": true,
    "projectId": true,
    "slug": true
  },
  "query": {
    "title": "Database connection failure in production"
  },
  "sort": {
    "createdAt": -1
  }
}

Response

{
  "count": 10,
  "limit": 10,
  "skip": 0,
  "data": [
    {
      "_id": "376ed290-28fe-11f1-b591-3fdcef396aba",
      "currentIncidentStateId": "d4e5f6a7-b8c9-0123-defg-456789012345",
      "declaredAt": "2024-01-15T09:30:00.000Z",
      "incidentSeverityId": "e5f6a7b8-c9d0-1234-efgh-567890123456",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "slug": "database-connection-failure-in-production"
    },
    {
      "_id": "376ed291-28fe-11f1-b591-3fdcef396aba",
      "currentIncidentStateId": "d4e5f6a7-b8c9-0123-defg-456789012345",
      "declaredAt": "2024-01-15T09:30:00.000Z",
      "incidentSeverityId": "e5f6a7b8-c9d0-1234-efgh-567890123456",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "slug": "database-connection-failure-in-production"
    },
    {
      "_id": "376ed292-28fe-11f1-b591-3fdcef396aba",
      "currentIncidentStateId": "d4e5f6a7-b8c9-0123-defg-456789012345",
      "declaredAt": "2024-01-15T09:30:00.000Z",
      "incidentSeverityId": "e5f6a7b8-c9d0-1234-efgh-567890123456",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "slug": "database-connection-failure-in-production"
    }
  ]
}
GETorPOST/api/incident/:id/get-item

Get item by ID

This endpoint allows you to retrieve Incident by ID.

  • id
    text
    ID of the Object

Optional Request Body

Get Item Request

POST
/api/incident/:id/get-item
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "select": {
    "currentIncidentStateId": true,
    "declaredAt": true,
    "incidentSeverityId": true,
    "projectId": true,
    "slug": true
  }
}

Response

{
  "_id": "376ed290-28fe-11f1-b591-3fdcef396aba",
  "currentIncidentStateId": "d4e5f6a7-b8c9-0123-defg-456789012345",
  "declaredAt": "2024-01-15T09:30:00.000Z",
  "incidentSeverityId": "e5f6a7b8-c9d0-1234-efgh-567890123456",
  "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
  "slug": "database-connection-failure-in-production"
}
POST/api/incident/count

Count

This endpoint allows you to retrieve the count of all your Incident.

Optional Request Body

Count Request

POST
/api/incident/count
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "query": {
    "title": "Database connection failure in production"
  }
}

Response

{
  "count": 107
}
POST/api/incident

Create Incident

This endpoint allows you to create a new object.

Create Request

POST
/api/incident
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "data": {
    "currentIncidentStateId": "d4e5f6a7-b8c9-0123-defg-456789012345",
    "declaredAt": "2024-01-15T09:30:00.000Z",
    "incidentSeverityId": "e5f6a7b8-c9d0-1234-efgh-567890123456",
    "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
    "title": "Database connection failure in production"
  }
}

Response

{
  "_id": "376ed290-28fe-11f1-b591-3fdcef396aba",
  "currentIncidentStateId": "d4e5f6a7-b8c9-0123-defg-456789012345",
  "declaredAt": "2024-01-15T09:30:00.000Z",
  "incidentSeverityId": "e5f6a7b8-c9d0-1234-efgh-567890123456",
  "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
  "slug": "database-connection-failure-in-production"
}
PUT/api/incident/:id

Update by ID

This endpoint allows you to update object by its ID.

Alternative Methods

For clients that do not support PUT requests, you can use POST or GET with the same request headers and body:

POST/api/incident/:id/update-item
GET/api/incident/:id/update-item

Update Request

PUT
/api/incident/:id
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "data": {
    "currentIncidentStateId": "d4e5f6a7-b8c9-0123-defg-456789012345",
    "declaredAt": "2024-01-15T09:30:00.000Z",
    "incidentSeverityId": "e5f6a7b8-c9d0-1234-efgh-567890123456"
  }
}

Response

{}
DELETE/api/incident/:id

Delete by ID

This endpoint allows you to delete object by its ID.

Alternative Methods

For clients that do not support DELETE requests, you can use POST or GET with the same request headers and body:

POST/api/incident/:id/delete-item
GET/api/incident/:id/delete-item

Delete Request

DELETE
/api/incident/:id
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY

Response

{}

Permissions

Your API Token needs permissions to create, update, read or delete this resource. If you do not have permissions to make a request a 4xx status will be sent as response.

Read Permissions

Required to read Incident

  • Project Owner
  • Project Admin
  • Project Member
  • Read Incident
  • Read All Project Resources

Create Permissions

Required to create Incident

  • Project Owner
  • Project Admin
  • Project Member
  • Create Incident

Update Permissions

Required to update Incident

  • Project Owner
  • Project Admin
  • Project Member
  • Edit Incident

Delete Permissions

Required to delete Incident

  • Project Owner
  • Project Admin
  • Project Member
  • Delete Incident