Find shifts
rotacloud_find_shiftsFind shifts in a time range by open/assigned state, published state, location, role and ELAPSED duration (end − start; the break is not subtracted). It reads page after page, so it is the way to select shifts for a bulk change such as rotacloud_delete_shifts: e.g. open shifts shorter than 3 hours = open: true, shorter_than_minutes: 180 (a shift of exactly 180 minutes does not match). Deleted shifts never match. Returns up to max_results matches (shift_ids plus a summary each: UTC times, elapsed_minutes, user, location, role, published). complete: true = the whole range was read. Otherwise pass next_offset as offset to continue — but after deleting or changing shifts, search again from offset 0, because the list positions move. GET /shifts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | Unix timestamp (seconds), an ISO 8601 date (2026-10-12 = 00:00 UTC) or an ISO 8601 date-time with a time zone (2026-10-12T09:00:00+01:00 or ...Z). | |
| open | No | true = only open (unassigned) shifts, false = only assigned shifts, omit = both. | |
| roles | No | Only shifts with these role ids. | |
| start | Yes | Unix timestamp (seconds), an ISO 8601 date (2026-10-12 = 00:00 UTC) or an ISO 8601 date-time with a time zone (2026-10-12T09:00:00+01:00 or ...Z). | |
| users | No | Only shifts of these user ids (add 0 to include open shifts). | |
| offset | No | Position in the range to start reading at; pass the previous reply's next_offset (0 again after a delete). | |
| locations | No | Only shifts at these location ids. | |
| published | No | true = only published shifts, false = only unpublished (draft) shifts. | |
| max_results | No | Most matches to return (1-100, default 100; rotacloud_delete_shifts takes up to 100 ids). | |
| at_least_minutes | No | Only shifts whose elapsed duration is this many minutes or more. | |
| shorter_than_minutes | No | Only shifts whose elapsed duration is strictly less than this many minutes. |