List shifts

List your shifts that overlap a time range, past or upcoming, to find the id that POST /v1/shifts/{shift_id}/operator and POST /v1/shifts/{shift_id}/defects take.

A shift is returned when any part of it falls between from and to: it ends after from and starts before to. So a night shift from 22:00 to 06:00 shows up in a range covering either day. The range may span at most 31 days; page through longer periods with consecutive ranges. Shifts come back ordered by start, then by machine.

Narrow the list with machineId, repeated for several machines:

GET /v1/shifts?from=2026-10-12T00:00:00Z&to=2026-10-13T00:00:00Z&machineId=12

Shifts excluded from metrics are listed too, with isConsidered: false.

Query Parameters

from*From

Return shifts that end after this moment. A time without a UTC offset is read as UTC.

Formatdate-time
to*To

Return shifts that start before this moment, at most 31 days after from. A time without a UTC offset is read as UTC.

Formatdate-time
machineId?array<integer>|

Only shifts of these machines, as returned by GET /v1/machines. Repeat it for several machines (machineId=12&machineId=13). All of your machines when omitted.

Response Body

application/json

application/json

Try it live
GET
/v1/shifts

This endpoint requires authentication — paste a token in the Authorization section below.

curl -X GET "https://example.com/v1/shifts?from=2026-10-12T00%3A00%3A00Z&to=2026-10-13T00%3A00%3A00Z"
[  {    "id": 48213,    "machineId": 12,    "title": "Morning",    "start": "2026-10-12T06:00:00Z",    "end": "2026-10-12T14:00:00Z",    "targetQuantity": 1200,    "isConsidered": true  }]