Skip to main content

Creating a Job

This endpoint will run the specified export by creating a job and adding it to the processing queue.

Where relevant, the date range to export data for will be based on the time that this API request was made.

Request​

POST: __/xfp/export/[export_id]/job__

This should be prefixed with the domain of your website, e.g. https://www.mywebsite.com/xfp/export/[export_id]/job.

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. |

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. | | 404 | Not Found | Specified export does not exist. |

Body content can be disregarded where an error status code is returned from the API.

warning

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.