labor_jobs
Returns a paginated list of top-level active jobs 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_jobs(
$warehouse_id: String!,
$first: Int,
$cursor: String,
$analyze: Boolean
) {
labor_jobs(
warehouse_id: $warehouse_id,
first: $first,
cursor: $cursor,
analyze: $analyze
) {
request_id
complexity
data {
edges {
node {
id
type
name
activated
parent_job {
id
name
type
parent_job {
...LaborJobReferenceFragment
}
}
subjobs {
id
name
type
parent_job {
...LaborJobReferenceFragment
}
}
created_at
updated_at
}
}
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_jobs": {
"request_id": "abc123",
"complexity": 987,
"data": LaborJobPage
}
}
}