API Set Name: jobs
API Description and Functional Purpose:
The jobs resource contains all background job activity and status.
- Jobs are generated by the application to manage and track contact imports and exports using the "contactimports" and "contactexports" APIs.
- The job information includes job status, job ID, job name, total items, completed items and start and end times.
- For import jobs specifically, jobs also include total records, number updated, number inserted, number rejected, duplicate records, invalid records and new records.
- Job names and IDs are given to the job automatically based on the API initiating the job type. For example, contactimports will assign the value of "ImportContacts" to the "jobName".
- Jobs can have a status of "Scheduled", "Pending", "Processing", "Failed" and "Done".
The following resource collections are associated to this collection.
|contactimports||The "contactimports" resource creates job documents/records in the "jobs" collection/resource.|
|contactexports||The "contactexports" resource creates job documents/records in the "jobs" collection/resource.|
|Retrieves all jobs from the Cordial database.
When retrieving a large amount of jobs in the response, it is possible to apply the "per_page" and "page" query string parameters to limit the count returned and page position.
Additionally, it is possible to filter the data set returned by job status using a query string for the parameter "status".
Example Request URIs
The following URI will retrieve all jobs and include all fields.
The following URI will retrieve the job with the "jobName" of "ImportContacts".
The following URI will retrieve all jobs, but will only include jobs that have a "status" of "Failed".
The following URI will retrieve all jobs starting from the third page grouping jobs by 10. For example, page-1 would have included the first 10, page-2 the second group of 10 and so on.
|Retrieves a specific job record from the Cordial database.
The job record is defined by the job's unique "id" value.
For example, /jobs/548817d0367df1ef518b4567 would return the response data for the job with the id of "548817d0367df1ef518b4567".
Example Request URIs
The following URI will retrieve the job with the "id" value of "123123".