GET - View export request
The export API allows you to retrieve a specific export request with its ID.
API Description
This API schema is available in the OpenAPI 3.1 format: View it online.
Route
The Project Export API exposes a GET endpoint that allows to get information about an export request:
https://api.batch.com/2.2/exports/view
Headers and authentication
See Overview → Using Project APIs.
Query parameters
Id | Description | |
---|---|---|
id | String - Required The export request ID. E.g. "export_nvctr8tgdjf7bppacxxt2aeemnjehfmw" |
Responses
Success
If the GET to the API endpoint is successful you will receive an HTTP 200 confirmation and information about your export request.
{
"id": "export_nvctr8tgdjf7bppacxxt2aeemnjehfmw",
"request_date": "2024-02-28T16:28:42Z",
"scope": "PROFILE_ATTRIBUTES",
"status": "SUCCESS",
"request": {
"export_type": "ATTRIBUTES",
"attributes": [
"$region",
"$phone_number",
"$timezone",
"$email_marketing",
"$sms_marketing",
"$language",
"$email_address"
],
"identifiers": [
"installation_ids",
"custom_id"
]
},
"completion_date": "2024-02-28T16:28:48Z",
"start_date": "2024-02-28T16:28:48Z",
"files": [
{
"id": "file_etxhwckcfc05egew7y97bdjtc75p7g8b",
"part": 1,
"size": 592752,
"url": "https://api.batch.com/2.2/exports/download?id=file_etxhwckcfc05egew7y97bdjtc75p7g8b"
}
]
}
The response includes all the extraction files available for download if any (in the files
field). The files can be downloaded via the provided URL in the url
field (see Download export API). Depending on the amount of data extracted, a request may have multiple output JSON
files with a maximum size of 100MB
.
Some information are only available when the status
field is SUCCESS
. 5 values are possible for request status:
CREATED
: for export request created and not yet PENDINGPENDING
: for export request ready-to-executeRUNNING
: for export request being executedSUCCESS
: for export request completed with successERROR
: for export request terminated with an error
Failure
If the POST data does not meet the API requirements you will receive an actionable error message. Contact us at support@batch.com if you need further support.
See the list of potential failures in the specification.