Skip to main content

List crew sheets

GET 

/api/v1/crew_sheets

Retrieve the sheet status of the users whose sheets you are allowed to work on, for one period. This is the data behind the Crew Entry screen, which is also known as timekeeping.

The collection is a list of users, not of sheets. Each row names one user and carries that user's sheet in each entry type for the period containing sheet_date. A user appears once per page whether they have three sheets, one, or none.

Required abilities

You must hold at least one of Authority - Timekeeper, Authority - Expensekeeper, or Authority - Custom Entry keeper, or be an administrator. Without one of these the request is refused with 403 Forbidden.

These abilities are group-scoped, so holding one is not enough on its own: you see a given user only when you and that user both belong to a group that carries the role granting you the ability. Each entry type is scoped separately, so you can be able to keep one user's time but not their expenses. Administrators see every user who can log their own time.

Administrators are not exempt over OAuth

On a Bearer-token request the administrator ability is suppressed, so the group-scoped rule above applies to administrators too. An administrator connecting an OAuth app sees only the users reached by the keeper roles they hold explicitly, and the groups those roles are in — which may be none, in which case the response is 200 OK with an empty results array rather than an error. See Administrators are not privileged over OAuth.

Only users who can log time for themselves are ever returned, that is, users holding Authority - User or Authority - Basic Time User. Users who exist purely to run reports or approve sheets are not crew.

Choosing the period and the entry types​

Use sheet_date to pick the period and sheet_types to pick which entry types to report on. Both are described under Parameters below.

Filtering​

This is a standard collection, so $filter, $top, $skip, and $orderBy work as they do elsewhere. Remember that all string literals in $filter must be JSON-encoded.

In addition to the user fields, this endpoint accepts a sheet_state filter, which selects users by the state of their sheets:

ValueMatches
openA sheet exists and is open for entry
submittedA sheet is submitted and awaiting approval
approvedA sheet has been approved
rejectedAn approver sent a sheet back
no_sheetThe user has no sheet at all for the period

Note that no_sheet is a status in its own right and is not included in open. Asking for open alone will not return people who have not started a sheet; ask for both when you want everyone with unfinished work.

A user matches when any of the requested entry types is in one of the requested states. The same list then decides which blocks appear on the row, so a user who matched on their time sheet does not also show an approved expense sheet you did not ask about.

Other fields you can filter on:

FilterExample
User namefullname contains "Alice"
Sign-in nameuser_login eq "alice"
User statusstatus intersects ["active"]
Group membershipgroups intersects ["64BBA147B9AC41D9978062300826C89F"]
Project accessshared_groups_projects intersects ["27C1F8B3D5A9426E9D0F5B41A8E2"]
Rolerole_names.pname eq "Timekeeper"
Abilityability_names.id eq "timekeeper"
User custom fieldusers_attribs:users_dept eq "Sales"

Any user custom field can be filtered on by its ID, whether or not an administrator has enabled it as a search option and whether or not it is configured as a column.

Sorting​

Sort on the user's own columns, for example fullname (the default, which is also accepted under the name pname) or user_login, and on role_names.pname. The three sheet columns (time, expense, custom) and the sheet_state filter are not sortable, because each is composed per row rather than selected from a column; asking for them returns 400 Bad Request. Note also that sorting uses the bare column name, so fullname asc works where id_user_properties.fullname asc does not.

Response shape and paging​

A page holds at most 100 rows, which is lower than most collections because every row costs a sheet lookup in each requested entry type. A larger $top is reduced to 100 rather than rejected. Follow @nextLink for the rest.

The row shape is fixed by the Crew Entry screen's column configuration rather than by the request, so the $keys parameter has no effect here. Add or remove columns with the Screen settings endpoints; the approval plan names, entry screen names, and user custom field values are each returned only when a matching column is configured, because each one costs an extra lookup.

Set $screenInclude=1 to also receive the screen object, which reports the column configuration along with which entry types you may keep. A client that only reads sheet data does not need it.

Request​

Responses​

A successful response from a paged collection; see the results array in the response for the list of results for this page. Additional pages may be available and can be fetched using the @nextLink URL.

Note that the examples given may include keys (fields) that may not always be present in the response, depending on the fields requested in the $keys parameter, the user's permissions, and other system settings.