Rerunning a Job
This endpoint will add a copy of the specified job to the processing queue. Where relevant, the date range to export data for will be based on the time that the original job was created.
Request
POST: __/xfp/export/[export_id]/job/[job_id]/rerun__
This should be prefixed with the domain of your website, e.g. https://www.mywebsite.com/xfp/export/[export_id]/job/[job_id]/rerun.
URL Parameters
| Name | Mandatory | Description | |-:-|-:-|:--| | export_id | Yes | The ID of the export to run. This can be found by choosing an export in the Data Management > Export list view, and noting the id in the URL of the resulting page. | | job_id | Yes | The ID of the job to re-run. This can be found in the response from a call to the Create Job endpoint, or in the notification sent to the application if a job completes successfully. |
Headers
| Name | Mandatory | Description | |-:-|-:-|:--| | X-Token | Yes | A secret relating to an active API application registered on the specified export. |
Possible Responses
Successful Response
HTTP Status Code: 201 (Created)
Response Body:
{
"job_identifier": (job id)
}
Error Responses
| HTTP Status Code | Description | Possibe cause(s) | |-:-|:--| | 401 | Unauthorised | X-Token header not provided, incorrect, or relating to a different export. | | 403 | Forbidden | Specified token matches the export, but was not the token used to create the original job. | | 404 | Not Found | Specified export or job does not exist, or the specified job does not belong to the specified export. |
Body content can be disregarded where an error status code is returned from the API.
- API applications are registered against individual exports. A 401 response will be returned if the specified token is from an API application that is registered against another export.
- Only jobs that were created via the API can be reran via the API.
- Only the token that created the original job can be used to rerun it.