Retrieve a data export request

Request

Retrieves a data export request.
Security
SecretApiKey or JWT
Path
idstring, <= 50 characters^[@~\-\.\w]+$required
ID of the resource.
Query
expandstring

Expands a request to include embedded objects within the _embedded property of the response. This field accepts a comma-separated list of objects.

For more information, see Embedded resources.

curl -i -X GET \
  'https://www.rebilly.com/_mock/catalog/all/experimental/data-exports/{id}?expand=string' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'

Responses

Data export request.
Headers
Pagination-Totalinteger

Total number of items that match the request. The value is independent of limit, including when limit is 0.

Example:332
Pagination-Limitinteger
Maximum number of items per page.
Example:100
Pagination-Offsetinteger

Specifies the starting point within the collection of resource results. For example, a request with limit=20 retrieves and displays the first 20 results on a page. A following request with limit=20 and offset=20, retrieves the next page of 20 results.

Example:2
Bodyapplication/json
idstring, <= 50 charactersread-only
ID of the export.
Example:"exp_0YVCNQ2C1AD1RA3HXKP492GNZB"
namestring, <= 50 charactersrequired
Name of the export.
resourcestringrequired
Type of resource to export.
Value:"customers"
Discriminator
formatstringrequired
Output format of the export.
Enum:"csv""json""json-api""xml""detailed-csv"
argumentsobject(DataExportArguments)

Export request arguments used to filter and sort the result set. For more information, see Arguments.

emailNotificationArray of strings, (email)
List of email addresses to notify when an export is completed.
fieldsArray of strings

List of fields to include in the export. For more information, see Fields.

recurringobject(DataExportRecurring)
Recurring export schedule.
userIdstring, <= 50 charactersread-only
ID of the user who requested the data export.
Example:"usr_0YVCEENYJ3D7Q9EN6BN16HA0G4"
fileIdstring or null, <= 50 characters(DataExportFileId)read-only

ID of the data export file. If the export contains more than 1,000,000 records, the file is a ZIP archive. The archive contains numbered part files, such as example-part1.csv and example-part2.csv, each with a maximum of 1,000,000 records. Each part file can be processed independently:

  • csv and detailed-csv part files repeat the header row.
  • json and json-api part files contain a complete array.
  • xml part files contain their own root element.

pdf exports are always a ZIP archive that contains one PDF per record, and are never split into part files.

Example:"file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N"
recordCountintegerread-only
Total number of records in the export, excluding the header row.
scheduledTimestring, (date-time)(ServerTimestamp)read-only
Date and time when the data export is scheduled to generate a file.
createdTimestring, (date-time)(CreatedTime)read-only
Date and time when the resource is created. This value is set automatically when the resource is created.
updatedTimestring, (date-time)(UpdatedTime)read-only
Date and time when the resource is updated. This value is set automatically when the resource is updated.
statusstringread-only
Status of export request.
Enum:"pending""queued""processing""completed""failed"
failureReasonstring or null(DataExportFailureReason)read-only

Reason the export failed, if the export status is failed.

Enum ValueDescription
record-limit-exceeded
Export exceeded the maximum number of records allowed for a single export.
max-retries-reached
Export failed after the maximum number of retry attempts.
creator-access-revoked
User who created the export no longer has permission to read the exported resource.
dateRangeobject(DataExportDateRange)

Date range of the data export. If this value is not set, all data is included. For more information, see Date ranges.

_embeddedobjectread-only

Embedded objects that are requested by the expand query parameter.

Response
{ "id": "exp_0YVCNQ2C1AD1RA3HXKP492GNZB", "name": "string", "resource": "customers", "format": "csv", "arguments": { "filter": "string", "sort": "string", "q": "string" }, "emailNotification": [ "user@example.com" ], "fields": [ "string" ], "recurring": { "instruction": "string", "start": "2019-08-24T14:15:22Z" }, "userId": "usr_0YVCEENYJ3D7Q9EN6BN16HA0G4", "fileId": "file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N", "recordCount": 0, "scheduledTime": "2019-08-24T14:15:22Z", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "status": "pending", "failureReason": "record-limit-exceeded", "dateRange": { "start": "yesterday", "end": "today", "field": "createdTime" }, "_links": [ { … } ], "_embedded": { "file": {}, "user": {} } }