GET - List export requests
The export API allows you to list all export requests and get their status.
This information is an array of all requests we currently know of for your application. The output contains requests created in the last 3 months. Each object in the array contains exactly the same information as you would get if you made a GET request with the request id.
API Description
This API schema is available in the OpenAPI 3.1 format: View it online.
Request structure
Route
The Export API exposes a GET endpoint that allows you to list all export requests and get their status :
https://api.batch.com/2.3/exports/list
Headers and authentication
See Overview → Using Project APIs.
Query parameters
Id | Description | |
---|---|---|
from | String - Optional for the first call Value used for pagination, it’s an opaque value returned by a previous call to list (next_from). E.g. "/exports/list?from=676DEZREZ" | |
limit | Integer - Optional, Default : 10, Max : 100 Value that indicates the number of audiences to be returned per API call. E.g. "/exports/list?limit=20" |
Responses
Success
If the GET to the API endpoint is successful you will receive an HTTP 200 confirmation and information about your export requests.
{
"exports": [
{
"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.3/exports/download?id=file_etxhwckcfc05egew7y97bdjtc75p7g8b"
}
]
}
],
"count": 10,
"has_more": true,
"next_from": "ZXhwb3J0X2dnNnN5d2RzcGg2eG00Nm1lZHNtMDRyZ3gyd2FiMDA1QDIwMjQtMDItMjdUMTQ6MTg6NTBa"
}
Some information are only available when the status
field is SUCCESS
.
If your export request returns no data, the files
array will be empty.
Pagination infos:
next_from
can be used for the next call to list to retrieve the next pagecount
is the number of items in the current page
Failure
If the GET 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.