GET
/
v1
/
shifts
curl --request GET \
  --url 'https://api.rootly.com/v1/shifts?include=SOME_STRING_VALUE&to=SOME_STRING_VALUE&from=SOME_STRING_VALUE&user_ids%5B%5D=SOME_ARRAY_VALUE&schedule_ids%5B%5D=SOME_ARRAY_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
{
  "data": [
    {
      "id": "1cd87653-6ff0-463f-b8b5-00f91e67dc61",
      "type": "shifts",
      "attributes": {
        "schedule_id": "bfc10b5d-6da7-47af-aee5-8e381e9575bf",
        "rotation_id": "f6dd2ed3-d431-4fa5-8794-6e2a4373ccee",
        "starts_at": "2024-07-02T21:00:00.000-07:00",
        "ends_at": "2024-07-02T23:00:00.000-07:00",
        "is_override": true
      },
      "relationships": {
        "shift_override": {
          "data": null
        },
        "user": {
          "data": {
            "id": "473",
            "type": "users"
          }
        }
      }
    },
    {
      "id": "d73e02ef-99c3-4ea2-bece-a46248761500",
      "type": "shifts",
      "attributes": {
        "schedule_id": "bfc10b5d-6da7-47af-aee5-8e381e9575bf",
        "rotation_id": "55619d31-b7e1-4c49-b50e-6ebfc6dbaa43",
        "starts_at": "2024-07-02T19:00:00.000-07:00",
        "ends_at": "2024-07-02T21:00:00.000-07:00",
        "is_override": false
      },
      "relationships": {
        "shift_override": {
          "data": null
        },
        "user": {
          "data": {
            "id": "473",
            "type": "users"
          }
        }
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

include
enum<string>

comma separated if needed. eg: shift_override,user

Available options:
shift_override,
user
to
string

Start range for shifts

from
string

End range for shifts

user_ids[]
integer[]
schedule_ids[]
string[]

Response

200
application/vnd.api+json
success
data
object[]
required

Was this page helpful?