Skip to main content
GET
/
schedules
/
{schedule_id}
Get a schedule
curl --request GET \
  --url https://api.shiftkeeper.io/schedules/{schedule_id} \
  --header 'x-api-key: <api-key>'
{
  "schedule": {
    "name": "<string>",
    "time_zone": "<string>",
    "layers": [
      {
        "name": "<string>",
        "rotation_start": "2023-11-07T05:31:56Z",
        "concurrent_oncall_users": 2,
        "users": [
          {
            "id": "<string>",
            "name": "<string>",
            "email": "jsmith@example.com",
            "role": "owner",
            "seat": "viewer",
            "time_zone": "<string>",
            "slack_id": "<string>"
          }
        ],
        "shift_length": {
          "amount": 2,
          "unit": "hours"
        },
        "restriction_intervals": [
          {
            "day": "monday",
            "from": "<string>",
            "to": "<string>"
          }
        ]
      }
    ],
    "teams": [
      {
        "id": "<string>",
        "name": "<string>",
        "description": "<string>"
      }
    ],
    "current_revision": 1,
    "current_revision_valid_from": "2023-11-07T05:31:56Z",
    "users": [
      {
        "id": "<string>",
        "name": "<string>",
        "email": "jsmith@example.com",
        "role": "owner",
        "seat": "viewer",
        "time_zone": "<string>",
        "slack_id": "<string>"
      }
    ],
    "description": "<string>",
    "current_oncall_shift": {
      "users": [
        {
          "id": "<string>",
          "name": "<string>",
          "email": "jsmith@example.com",
          "role": "owner",
          "seat": "viewer",
          "time_zone": "<string>",
          "slack_id": "<string>"
        }
      ],
      "start": "2023-11-07T05:31:56Z",
      "end": "2023-11-07T05:31:56Z"
    },
    "next_oncall_shift": {
      "users": [
        {
          "id": "<string>",
          "name": "<string>",
          "email": "jsmith@example.com",
          "role": "owner",
          "seat": "viewer",
          "time_zone": "<string>",
          "slack_id": "<string>"
        }
      ],
      "start": "2023-11-07T05:31:56Z",
      "end": "2023-11-07T05:31:56Z"
    }
  }
}

Authorizations

x-api-key
string
header
required

Enter your API key which starts with 'keeper_'

Path Parameters

schedule_id
string
required

The ID of the schedule.

Response

Default Response

schedule
object
required
Example:
{
"name": "Incident responders",
"description": "Incident responders",
"time_zone": "Europe/Berlin",
"layers": [
{
"name": "Main",
"rotation_start": "2024-01-01T00:00:00Z",
"concurrent_oncall_users": 1,
"users": [
{
"id": "usr_bq7CmsOKLmkMeZkUUu1hy",
"name": "Rick",
"email": "rick@example.org",
"time_zone": "Europe/Paris",
"role": "owner",
"seat": "member",
"slack_id": "U082KENSEQ3"
},
{
"id": "usr_C0GwCFdk0I4pBMRny4qYV",
"name": "Dena",
"email": "dena@example.org",
"role": "standard",
"seat": "member",
"slack_id": "U082GMAFR1T"
},
{
"id": "usr_YlxrjoB1JqUsollScfFYT",
"name": "Lily",
"email": "lily@example.org",
"time_zone": "America/New_York",
"role": "standard",
"seat": "viewer",
"slack_id": "U0529FWNCG2"
}
],
"shift_length": { "amount": 1, "unit": "weeks" },
"restriction_intervals": []
}
],
"current_revision": 1,
"current_revision_valid_from": "2024-12-01T00:00:00Z",
"current_oncall_shift": {
"users": [
{
"id": "usr_bq7CmsOKLmkMeZkUUu1hy",
"name": "Rick",
"email": "rick@example.org",
"time_zone": "Europe/Paris",
"role": "owner",
"seat": "member",
"slack_id": "U082KENSEQ3"
}
],
"start": "2024-01-01T00:00:00Z",
"end": "2024-01-01T01:00:00Z"
},
"next_oncall_shift": {
"users": [
{
"id": "usr_C0GwCFdk0I4pBMRny4qYV",
"name": "Dena",
"email": "dena@example.org",
"role": "standard",
"seat": "member",
"slack_id": "U082GMAFR1T"
}
],
"start": "2024-01-01T01:00:00Z",
"end": "2024-01-01T02:00:00Z"
},
"users": [
{
"id": "usr_bq7CmsOKLmkMeZkUUu1hy",
"name": "Rick",
"email": "rick@example.org",
"time_zone": "Europe/Paris",
"role": "owner",
"seat": "member",
"slack_id": "U082KENSEQ3"
},
{
"id": "usr_C0GwCFdk0I4pBMRny4qYV",
"name": "Dena",
"email": "dena@example.org",
"role": "standard",
"seat": "member",
"slack_id": "U082GMAFR1T"
},
{
"id": "usr_YlxrjoB1JqUsollScfFYT",
"name": "Lily",
"email": "lily@example.org",
"time_zone": "America/New_York",
"role": "standard",
"seat": "viewer",
"slack_id": "U0529FWNCG2"
}
],
"teams": [
{
"id": "tea_VJ4sYEOOXVvJBXqFjRzpm",
"name": "Payments",
"description": "All about payments and billing"
}
]
}