Download Postman collection
Understand and manage your running flows
Relative URI |
Method |
Success Code |
Description |
---|---|---|---|
|
|
|
Get all jobs. The following query parameters are supported: _integrationId, _exportId, _importId, _flowId, _flowJobId, _flowId_in, createdAt_lte, createdAt_gte, status, numSuccess_lte, numSuccess_gte, numIgnore_lte, numIgnore_gte, type, and type_in |
|
|
|
Get a specific job. |
GET /v1/jobs?type=import&status=running HTTP/1.1 Host: api.integrator.io Authorization: Bearer my_api_token
[ { "_id":"59ee8f9503785d04d846a88e", "type":"import", "_importId":"537d1ff57ab1870200000002", "_flowJobId":"59ee8f80e41d93365ef1b9a9", "startedAt":"2017-10-24T00:55:49.128Z", "status":"running", "numError":0, "numSuccess":1, "numIgnore":0, "numPagesProcessed":1, "oIndex":1, "retriable":false, "createdAt":"2017-10-24T00:55:49.128Z", "lastModified":"2017-10-24T00:55:49.642Z" } ]
While the Jobs API endpoint doesn’t have an official paging mechanism, you can pass several parameters to mimic a paging scheme. After you call the endpoint, it returns 1000 results in descending order based on the createdAt field. To get the next 1000 records, use the createdAt value from the last record in the first set and subtract 1 millisecond. Then, compare that as a parameter in your subsequent calls against the createdAt_lte field.
Relative URI: /v1/jobs
This allows you to get all jobs.
Paging Method: Custom relative URI Override relative URI for subsequent page requests: /v1/jobs?createdAt_lte={{{dateAdd previous_page.last_record.createdAt '-1'}}}
This allows you to get all previous jobs within your accounts retention policy.
Relative URI: /v1/jobs?createdAt_gte={{lastExportDateTime}}
This allows you to get all jobs created since the last export.
Paging Method: Custom relative URI
Override relative URI for subsequent page requests: /v1/jobs?createdAt_lte={{{dateAdd previous_page.last_record.createdAt '-1'}}}&createdAt_gte={{{lastExportDateTime}}}
This allows you to get all previous jobs created since the last export that fall within your accounts retention policy.
Comments
Please sign in to leave a comment.