Get jobs
This method allows you to retrieve a comprehensive list of jobs and sub-jobs, with the flexibility to filter the results based on various parameters.
There are two endpoints to retrieve jobs: Get Job (to retrieve information on a single job by the job ID) and Get Jobs (to retrieve multiple jobs associated with the account based on specific filters).
In the Get Job method, you need to specify the job ID (or sub-job ID) in the path URL to retrieve the relevant job.
Good to know
To retrieve sub-job by ID, please use to the Get job endpoint.
As for the Get Jobs method, these are the following fields to filter by in the query parameters:
- instanceIds: List of instance IDs (scheduler ID or time clock ID) to filter by. Only one instance can be specified in the array.
- jobIds: List of job IDs to filter by. In cases where a job ID includes nested sub-jobs, all sub-jobs under that parent job will be retrieved alongside with the parent job. Note that this filter does not support direct querying by sub-job IDs.
- jobNames: List of job names to filter by. In case where a sub-job name is provided, the relevant sub-job with all other nested sub-jobs will be retrieved alongside with the parent job.
- jobCodes: List of job codes to filter by. In case where a sub-job code is provided, the relevant sub-job with all other nested sub-jobs will be retrieved alongside with the parent job.
- includeDeleted: Determines whether the response includes jobs that have been deleted. The default value is set to true.
- sort: The sort key for ordering the results (currently supported only for the job title).
- order: The order of the sort key (set to ascending by default).
- limit & offset: Pagination support. Check the reference page for the current default values.
Request example for Get jobs method with specified query params
curl --request GET \
--url 'https://api.connecteam.com/jobs/v1/jobs?instanceIds=2131234&jobIds=&includeDeleted=false&order=asc&limit=500&offset=0' \
--header 'accept: application/json'
Request example for Get single job method with specified query params
curl --request GET \
--url https://api.connecteam.com/jobs/v1/jobs/124234234-12fsdsdf-123123131 \
--header 'accept: application/json'
Updated 5 days ago