v3

latestOpenAPI 3.0.12026-07-31240345599.7 KB
Schedule timelines

Get schedule timeline

Returns the timeline of the schedule with given id in the request. The time range of the timeline can go back at most one year from today and as far as two years from today. Therefore, query parameters should be given accordingly.<br> <br> Permissions required: Permission to access to the schedule:

  • the user has read-only administrative right.
  • the schedule's assigned team is one of the teams that the user belongs to.
  • the user is added to a rotation of the schedule as a responder.
  • a team is added to a rotation of the schedule as a responder, and the user is a member of this team.
  • an escalation is added to a rotation of the schedule as a responder, and the user is a member of this escalation.
  • there is an override to the user in the schedule.
get/api/{cloudId}/v1/schedules/{scheduleId}/timeline

Path parameters

scheduleIdstring required

ID of the schedule.

Query parameters

intervalinteger

The length of the timeline calculation time range as an integer in intervalUnits.

intervalUnit'days' | 'weeks' | 'months'

The unit of the timeline calculation time range.

datestring date-time

The date to calculate timeline according to. The interval, intervalUnit, and this field are combined to calculate to time range of the timeline. The start of the time range is the point of time that is the beginning of the intervalUnit containing this date. The end of the time range is the point of time intervalUnit * interval time is added to the start of the time range. <br> <br> For example, for the parameters interval = 2, intervalUnit = months, date = '2023-12-15T15:20:25+00:00', the time range of the timeline is (2023-12-01T00:00:00+00:00, 2024-02-01T00:00:00+00:00).

expandstring[]

The list of possible expansions in the response. The default response only contains the timeline of the final layer. With these expansions, timeline of base, forwarding, and override layers can also be calculated. Possible values: base, forwarding, override.

Response

Returned if the request is successful.

startDatestring date-time

Start time of the timeline.

endDatestring date-time

End time of the timeline.

_expandsstring[]

List of all possible expansions.

Example response

{
  "startDate": "2024-01-29T00:00:00Z",
  "endDate": "2024-02-12T00:00:00Z",
  "finalTimeline": {
    "rotations": [
      {
        "id": "072cb9c1-698e-49fa-b1dc-1e8c190a76a6",
        "name": "Primary Rotation",
        "order": 1,
        "deleted": false,
        "periods": [
          {
            "startDate": "2024-01-29T00:00:00Z",
            "endDate": "2024-02-01T08:11:21.263Z",
            "type": "historical",
            "responder": {
              "id": "153c98d1-ca2c-44d8-b8ea-10280f7c2c75",
              "type": "team"
            },
            "flattenedResponders": [
              {
                "id": "153c98d1-ca2c-44d8-b8ea-10280f7c2c75",
                "type": "team"
              }
            ]
          },
          {
            "startDate": "2024-02-01T08:11:21.263Z",
            "endDate": "2024-02-01T08:12:19.866Z",
            "type": "historical",
            "responder": {
              "id": "5b2b0e011b3a756623f4e25e",
              "type": "user"
            },
            "flattenedResponders": [
              {
                "id": "5b2b0e011b3a756623f4e25e",
                "type": "user"
              }
            ]
          },
          {
            "startDate": "2024-02-01T08:12:19.866Z",
            "endDate": "2024-02-02T00:00:00Z",
            "type": "override",
            "responder": {
              "id": "5b2b0e011b3a756623f4e25e",
              "type": "user"
            }
          },
          {
            "startDate": "2024-02-02T00:00:00Z",
            "endDate": "2024-02-03T07:00:00Z",
            "type": "base",
            "responder": {
              "id": "153c98d1-ca2c-44d8-b8ea-10280f7c2c75",
              "type": "team"
            }
          },
          {
            "startDate": "2024-02-03T07:00:00Z",
            "endDate": "2024-02-05T21:00:00Z",
            "type": "base",
            "responder": {
              "id": "5b2b0e011b3a756623f4e25e",
              "type": "user"
            }
          },
          {
            "startDate": "2024-02-05T21:00:00Z",
            "endDate": "2024-02-06T21:00:00Z",
            "type": "forwarding",
            "from": {
              "id": "40973cb0-6990-4997-aac3-46f8a6031f0f",
              "type": "user",
              "deleted": false
            },
            "responder": {
              "id": "e75fed1b-4234-45bc-b5b3-b936979f3cc0",
              "type": "user"
            }
          },
          {
            "startDate": "2024-02-06T21:00:00Z",
            "endDate": "2024-02-10T07:00:00Z",
            "type": "base",
            "responder": {
              "id": "5b2b0e011b3a756623f4e25e",
              "type": "user"
            }
          },
          {
            "startDate": "2024-02-10T07:00:00Z",
            "endDate": "2024-02-12T00:00:00Z",
            "type": "base",
            "responder": {
              "id": "153c98d1-ca2c-44d8-b8ea-10280f7c2c75",
              "type": "team"
            }
          }
        ]
      },
      {
        "id": "18b6b7e7-b83b-4b18-81c2-e3f7ceb9ef7b",
        "name": "Secondary Rotation",
        "order": 4,
        "deleted": false,
        "periods": [
          {
            "startDate": "2024-01-29T00:00:00Z",
            "endDate": "2024-02-01T07:00:00Z",
            "type": "historical",
            "responder": {
              "id": "ab73148c-afa6-4604-ae04-7dc5daea6c8b",
              "type": "escalation"
            },
            "flattenedResponders": [
              {
                "id": "e75fed1b-4234-45bc-b5b3-b936979f3cc0",
                "type": "user"
              },
              {
                "id": "5b2b0e011b3a756623f4e25e",
                "type": "user"
              }
            ]
          },
          {
            "startDate": "2024-02-01T07:00:00Z",
            "endDate": "2024-02-01T08:12:19.866Z",
            "type": "historical",
            "responder": {
              "id": "5b2b0e011b3a756623f4e25e",
              "type": "user"
            },
            "flattenedResponders": [
              {
                "id": "5b2b0e011b3a756623f4e25e",
                "type": "user"
              }
            ]
          },
          {
            "startDate": "2024-02-01T08:12:19.866Z",
            "endDate": "2024-02-04T00:00:00Z",
            "type": "base",
            "responder": {
              "id": "5b2b0e011b3a756623f4e25e",
              "type": "user"
            }
          },
          {
            "startDate": "2024-02-04T00:00:00Z",
            "endDate": "2024-02-05T00:00:00Z",
            "type": "override",
            "responder": {
              "id": "e75fed1b-4234-45bc-b5b3-b936979f3cc0",
              "type": "user"
            }
          },
          {
            "startDate": "2024-02-05T00:00:00Z",
            "endDate": "2024-02-05T21:00:00Z",
            "type": "base",
            "responder": {
              "id": "5b2b0e011b3a756623f4e25e",
              "type": "user"
            }
          },
          {
            "startDate": "2024-02-05T21:00:00Z",
            "endDate": "2024-02-06T21:00:00Z",
            "type": "forwarding",
            "from": {
              "id": "40973cb0-6990-4997-aac3-46f8a6031f0f",
              "type": "user",
              "deleted": false
            },
            "responder": {
              "id": "e75fed1b-4234-45bc-b5b3-b936979f3cc0",
              "type": "user"
            }
          },
          {
            "startDate": "2024-02-06T21:00:00Z",
            "endDate": "2024-02-12T00:00:00Z",
            "type": "base",
            "responder": {
              "id": "5b2b0e011b3a756623f4e25e",
              "type": "user"
            }
          }
        ]
      },
      {
        "id": "9625a842-18b0-464f-8d6e-b5ea33af8a13",
        "name": "Backup Rotation",
        "order": null,
        "deleted": true,
        "periods": [
          {
            "startDate": "2024-01-29T00:00:00Z",
            "endDate": "2024-01-29T12:00:00Z",
            "type": "historical",
            "responder": {
              "type": "noone"
            }
          },
          {
            "startDate": "2024-01-29T12:00:00Z",
            "endDate": "2024-01-30T12:00:00Z",
            "type": "historical",
            "responder": {
              "id": "ab73148c-afa6-4604-ae04-7dc5daea6c8b",
              "type": "escalation"
            },
            "flattenedResponders": [
              {
                "id": "e75fed1b-4234-45bc-b5b3-b936979f3cc0",
                "type": "user"
              },
              {
                "id": "5b2b0e011b3a756623f4e25e",
                "type": "user"
              }
            ]
          },
          {
            "startDate": "2024-01-30T12:00:00Z",
            "endDate": "2024-01-31T12:00:00Z",
            "type": "historical",
            "responder": {
              "type": "noone"
            }
          },
          {
            "startDate": "2024-01-31T12:00:00Z",
            "endDate": "2024-02-01T07:59:12.993Z",
            "type": "historical",
            "responder": {
              "id": "ab73148c-afa6-4604-ae04-7dc5daea6c8b",
              "type": "escalation"
            },
            "flattenedResponders": [
              {
                "id": "e75fed1b-4234-45bc-b5b3-b936979f3cc0",
                "type": "user"
              },
              {
                "id": "5b2b0e011b3a756623f4e25e",
                "type": "user"
              }
            ]
          }
        ]
      },
      {
        "id": "2adfb43b-dfdf-455d-9e67-6bd4cce76d11",
        "name": "Old Rotation",
        "order": null,
        "deleted": true,
        "periods": [
          {
            "startDate": "2024-01-29T08:00:00Z",
            "endDate": "2024-01-30T18:30:00Z",
            "type": "historical",
            "responder": {
              "type": "noone"
            }
          },
          {
            "startDate": "2024-01-31T09:00:00Z",
            "endDate": "2024-02-01T07:59:17.791Z",
            "type": "historical",
            "responder": {
              "type": "noone"
            }
          }
        ]
      }
    ]
  },
  "baseTimeline": {
    "rotations": [
      {
        "id": "072cb9c1-698e-49fa-b1dc-1e8c190a76a6",
        "name": "Primary Rotation",
        "order": 1,
        "deleted": false,
        "periods": [
          {
            "startDate": "2024-01-29T00:00:00Z",
            "endDate": "2024-02-03T07:00:00Z",
            "type": "base",
            "responder": {
              "id": "153c98d1-ca2c-44d8-b8ea-10280f7c2c75",
              "type": "team"
            }
          },
          {
            "startDate": "2024-02-03T07:00:00Z",
            "endDate": "2024-02-10T07:00:00Z",
            "type": "base",
            "responder": {
              "id": "5b2b0e011b3a756623f4e25e",
              "type": "user"
            }
          },
          {
            "startDate": "2024-02-10T07:00:00Z",
            "endDate": "2024-02-12T00:00:00Z",
            "type": "base",
            "responder": {
              "id": "153c98d1-ca2c-44d8-b8ea-10280f7c2c75",
              "type": "team"
            }
          }
        ]
      },
      {
        "id": "18b6b7e7-b83b-4b18-81c2-e3f7ceb9ef7b",
        "name": "Secondary Rotation",
        "order": 4,
        "deleted": false,
        "periods": [
          {
            "startDate": "2024-01-29T00:00:00Z",
            "endDate": "2024-02-01T07:00:00Z",
            "type": "base",
            "responder": {
              "id": "ab73148c-afa6-4604-ae04-7dc5daea6c8b",
              "type": "escalation"
            }
          },
          {
            "startDate": "2024-02-01T07:00:00Z",
            "endDate": "2024-02-12T00:00:00Z",
            "type": "base",
            "responder": {
              "id": "5b2b0e011b3a756623f4e25e",
              "type": "user"
            }
          }
        ]
      }
    ]
  },
  "overrideTimeline": {
    "rotations": [
      {
        "id": "072cb9c1-698e-49fa-b1dc-1e8c190a76a6",
        "name": "Primary Rotation",
        "order": 1,
        "deleted": false,
        "periods": [
          {
            "startDate": "2024-02-01T08:11:21.263Z",
            "endDate": "2024-02-02T00:00:00Z",
            "type": "override",
            "responder": {
              "id": "5b2b0e011b3a756623f4e25e",
              "type": "user"
            }
          }
        ]
      },
      {
        "id": "18b6b7e7-b83b-4b18-81c2-e3f7ceb9ef7b",
        "name": "Secondary Rotation",
        "order": 4,
        "deleted": false,
        "periods": [
          {
            "startDate": "2024-02-04T00:00:00Z",
            "endDate": "2024-02-05T00:00:00Z",
            "type": "override",
            "responder": {
              "id": "e75fed1b-4234-45bc-b5b3-b936979f3cc0",
              "type": "user"
            }
          }
        ]
      }
    ]
  },
  "forwardingTimeline": {
    "rotations": [
      {
        "id": "072cb9c1-698e-49fa-b1dc-1e8c190a76a6",
        "name": "Primary Rotation",
        "order": 1,
        "deleted": false,
        "periods": [
          {
            "startDate": "2024-02-05T21:00:00Z",
            "endDate": "2024-02-06T21:00:00Z",
            "type": "forwarding",
            "from": {
              "id": "40973cb0-6990-4997-aac3-46f8a6031f0f",
              "type": "user",
              "deleted": false
            },
            "responder": {
              "id": "e75fed1b-4234-45bc-b5b3-b936979f3cc0",
              "type": "user"
            }
          }
        ]
      },
      {
        "id": "18b6b7e7-b83b-4b18-81c2-e3f7ceb9ef7b",
        "name": "Secondary Rotation",
        "order": 4,
        "deleted": false,
        "periods": [
          {
            "startDate": "2024-02-05T21:00:00Z",
            "endDate": "2024-02-06T21:00:00Z",
            "type": "forwarding",
            "from": {
              "id": "40973cb0-6990-4997-aac3-46f8a6031f0f",
              "type": "user",
              "deleted": false
            },
            "responder": {
              "id": "e75fed1b-4234-45bc-b5b3-b936979f3cc0",
              "type": "user"
            }
          }
        ]
      }
    ]
  },
  "_expands": [
    "base",
    "forwarding",
    "override"
  ]
}