Returns one row per person-on-a-shift, carrying the status they are at and the times they checked in and out.
The same listing is published on two paths and they differ in scope. /event/{event_id}/shift/{shift_id}/user returns the people on that one shift. /event/shift/user returns every assignment in the account, across every event, and is the one to reach for when you are syncing rather than looking at a single shift - narrow it with filter and page through it.
The response is only wrapped in a paginated envelope when a page parameter is sent. Without one, every match comes back as a flat array. The envelope carries no total and no last_page - page until next_page_url is null rather than counting pages up front.
Rows carry no related records at all, whichever path you use. The person's name and the shift's name are on the row as nice.user_name and nice.shift_name; for anything more, read the user or the shift by the ids the row carries.
A filter to apply to the results. Declared as an array of objects, where each object contains an attr (attribute code), operator and value key. Examples:
?filter[0]['attr']=name&filter[0][operator]=like&filter[0][value]=luke
?filter[0]['attr']=id&filter[0][operator]=>&filter[0][value]=265
See the filters documentation for more details on how to use this.
A list of extras to include in the response. These are objects or arrays that are not part of the model's primary attributes, such as stats and counts. For fast responses, avoid requesting them if you don't need them.
A list of relations to include in the response. May be single records or collections. It is often more efficient to retrieve this way, to avoid follow-up API calls.
- Mock serverhttps://developer.rosterfy.com/_mock/api-docs/openapi/api/v2/event/{event_id}/shift/{shift_id}/user
- Your Rosterfy accounthttps://example.rosterfy.com/api/v2/event/{event_id}/shift/{shift_id}/user
curl -i -X GET \
'https://developer.rosterfy.com/_mock/api-docs/openapi/api/v2/event/{event_id}/shift/{shift_id}/user?scan=smith&active=true&leader=true&per_page=5&page=1&filter=%7Bfilter%7D&sort_by=%7Bsort_by%7D&sort_order=%7Bsort_order%7D&_locale=en-US&extras=shift_schedule_view_attributes&with=role_offer' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Rosterfy-Platform: admin'[ { "current_page": 1, "data": [ … ], "first_page_url": "https://example.rosterfy.com/api/v2/event/{event}/shift/{shift}/user?per_page=5&_locale=en-US&page=1", "from": 1, "next_page_url": "https://example.rosterfy.com/api/v2/event/{event}/shift/{shift}/user?per_page=5&_locale=en-US&page=2", "path": "https://example.rosterfy.com/api/v2/event/{event}/shift/{shift}/user", "per_page": 5, "prev_page_url": null, "to": 5 } ]