Listing Workspace Jobs
List jobs belonging to the given workspace.
The ListJobs API allows you to list your workspace's jobs. We also support filtering jobs by member, status, and time ranges.
Request Parameters
The filter string. See the Filtering section for details on job filtering. Additionally, check the filtering documentation for more information.
The page size for search result pagination. If not provided, the service will default to 50 items.
The page to fetch. If any, this would be the next_page_token
value returned from the previous request.
Sample Request
Copied1curl -X GET 'https://api.worklayer.com/v1.0/jobs' \2-H 'Authorization: Bearer {token}'
Response
The jobs belonging to your workspace. See the job reference page.
The pagination token to retrieve the next page of results. If the value is ""
, it means no further results for the request.
Sample Response
Copied1{2 "data": [3 {4 "id": "a9749189-c82b-488b-a448-8f74c3d254e0",5 "short_id": "7GRK4ERKFLL",6 "name": null,7 "description": "Tony Stark | 2021 | 1040",8 "workspace_id": "91",9 "status": "CLAIMED",10 "create_time": "2021-06-08T17:38:41.818Z",11 "update_time": "2022-05-18T18:35:30.136Z",12 "transmit_time": "2022-05-18T18:35:29.131Z",13 "deadline_time": null,14 "total_amount": 199,15 "members": [16 // members omitted here for brevity17 ]18 },19 {20 "id": "576d676e-badb-452b-80ec-93a334833740",21 "short_id": "TWUWSKJVS2S",22 "name": "Personal Return",23 "description": "Natasha Romanov | 2021 | 1040",24 "workspace_id": "91",25 "status": "UNDER_CONSTRUCTION",26 "create_time": "2022-02-17T17:44:31.737Z",27 "update_time": "2022-02-17T17:45:13.285105Z",28 "transmit_time": null,29 "deadline_time": null,30 "total_amount": 299,31 "members": "members": [32 // members omitted here for brevity33 ]34 },35 ],36 "next_page_token": "c3RyaW5nL3dvcmtzcGFjZV9tZW1iZXIudXNlcl9pZC9hc2MvbG9jYWwlN0NlMmNlMTM0ZC03NmYyLTVhNzctOWQ2Yy05MDY2NjVkM2VlNTQ="37}
Filtering
The following fields are supported:
Field | Comparators | Description | Example |
---|---|---|---|
members.user_id | : | Check for the presence of a particular user on the job. | members.user_id:"some-user-id" |
status | = , != | The job's status. See the Status enumeration for allowed values. | status = CLAIMED |
create_time | = , != , > , >= , < , <= | The job's creation time | create_time >= "2022-01-01T12:00:00Z" |
transmit_time | = , != , > , >= , < , <= | The time that the job entered the pool | transmit_time =< "2022-12-31T23:59:59Z" |
deadline_time | = , != , > , >= , < , <= | The job's deadline time | deadline_time < "2022-02-01T17:00:00Z" |
AND
and OR
are allowed when combining filters.
Sample Requests With Filters
Getting all jobs that are either in Claimed or Closed status:
Copied1```bash2curl -X GET 'https://api.worklayer.com/v1.0/jobs?filter=status="CLAIMED" OR status="CLOSED"' \3-H 'Authorization: Bearer {token}'
Getting all jobs a user is a member of:
Copied1curl -X GET 'https://api.worklayer.com/v1.0/jobs?filter=members.user_id:"some-user-id"' \2-H 'Authorization: Bearer {token}'
Errors
Forbidden
: API Client cannot list workspace jobs.Unauthorized
: API Client does not have valid credentials.NotFound
: One or more jobs weren't found.BadRequest
: Either the filter that was provided is in an incorrect format, or there was a malformed request