List of incident timeline events

Returns a list of timeline items for the given incident.

GET https://betteruptime.com/api/v2/incidents/{incident_id}/timeline

URL parameters

incident_id
required string

Headers

Authorization
required string
200

Response body

{
  "data": [
    {
      "id": "2021-02-12 23:59:59 UTC",
      "type": "timeline_item",
      "attributes": {
        "item_type": "timeline_truncated",
        "at": "2021-02-12T23:59:59.000Z",
        "data": {
          "title": "Skipping 123 timeline events"
        }
      }
    },
    {
      "id": "23",
      "type": "timeline_item",
      "attributes": {
        "item_type": "comment",
        "at": "2021-02-12T10:44:46.618Z",
        "data": {
          "title": null,
          "content": {
            "text": "Some comment with attachment",
            "user": {
              "id": 123,
              "name": "John Smith"
            }
          },
          "attachments": [
            {
              "size": 44369,
              "filename": "Screenshot 2021-02-12 at 10.44.45.png",
              "mime_type": "image/png",
              "url": "https://some-storage.s3.amazonaws.com/attachments/abc123.png"
            }
          ]
        }
      }
    },
    {
      "id": "107107309",
      "type": "timeline_item",
      "attributes": {
        "item_type": "generic_card",
        "at": "2021-02-12T07:49:14.539Z",
        "data": {
          "title": "Some title",
          "content": "John Smith opened the incident email sent to [email protected]",
          "links": [
            "https://betteruptime.com/team/1/team-members/1"
          ]
        }
      }
    },
    {
      "id": "2470302-content-response",
      "type": "timeline_item",
      "attributes": {
        "item_type": "response_item",
        "at": "2021-02-12T06:42:25.905Z",
        "data": {
          "title": "Page response",
          "content": "[\"Some response data\"]"
        }
      }
    },
    {
      "id": "2107504",
      "type": "timeline_item",
      "attributes": {
        "item_type": "payload",
        "at": "2021-02-11T07:52:57.540Z",
        "data": {
          "title": "Datadog",
          "content": "Datadog alert.",
          "attachments": [
            {
              "size": 123456,
              "filename": "File.png",
              "mime_type": "image/png",
              "url": "https://some-storage.s3.amazonaws.com/attachments/xyz123.png"
            }
          ]
        }
      }
    },
    {
      "id": "incident-started",
      "type": "timeline_item",
      "attributes": {
        "item_type": "generic",
        "at": "2021-02-10T04:02:57.755Z",
        "data": {
          "content": "Incident started.",
          "links": [

          ]
        }
      }
    }
  ]
}

Example cURL

curl --request GET \
  --url https://betteruptime.com/api/v2/incidents/123456789/timeline \
  --header 'Authorization: Bearer YOUR_API_TOKEN'
Copied!