labor_workers
Returns a paginated list of workers in a warehouse. Please note that this query is EXPERIMENTAL and may be changed, renamed, or removed without notice. For that reason, it must not be used for integrations. This query must also be enabled as a feature for the account; otherwise, the API responds with "Feature not enabled".
Arguments
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
warehouse_id | String! | Yes | Base64-encoded public_api warehouse id | |
first | Int | No | Page size (workforce_hero cursor pagination) | |
cursor | String | No | Cursor returned by a previous page | |
analyze | Boolean | No | If true, the query will only be analyzed (cost estimated) without executing it. |
Return Type
Query
query labor_workers(
$warehouse_id: String!,
$first: Int,
$cursor: String,
$analyze: Boolean
) {
labor_workers(
warehouse_id: $warehouse_id,
first: $first,
cursor: $cursor,
analyze: $analyze
) {
request_id
complexity
data {
edges {
node {
worker_id
name
user_id
position
profile_image
alerts {
type
created_at
}
special_project {
id
name
started_at
}
current_shift {
started_at
finished_at
}
shifts_management {
id
name
}
current_activity {
id
started_at
finished_at
last_activity_at
job {
id
name
type
parent_job {
...LaborJobReferenceFragment
}
}
status
tags
}
assigned_job_info {
id
created_at
updated_at
job {
id
name
type
parent_job {
...LaborJobReferenceFragment
}
}
}
}
}
page_info {
has_next_page
has_previous_page
start_cursor
end_cursor
}
}
}
}Variables
{
"warehouse_id": "abc123",
"first": 987,
"cursor": "abc123",
"analyze": true
}Response
{
"data": {
"labor_workers": {
"request_id": "abc123",
"complexity": 987,
"data": LaborWorkerPage
}
}
}