Modify a data export

Request

Modifies a pending data export.

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.

Bodyapplication/jsonrequired

Data Export Request.

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.

dateRangeobject(DataExportDateRange)

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

curl -i -X PUT \
  'https://www.rebilly.com/_mock/catalog/all/experimental/data-exports/{id}?expand=string' \
  -H 'Content-Type: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "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"
    },
    "dateRange": {
      "start": "yesterday",
      "end": "today",
      "field": "createdTime"
    }
  }'

Responses

Data export modified.

Headers
X-RateLimit-Limitinteger

Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.

Example:3600
X-RateLimit-Remaininginteger

Remaining number of rate limit tokens for this request within the rate limit period. For example, in the sandbox environment, rate limits for non-GET endpoints are set at 3000 requests per 10 minutes.

Example:3600
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.

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": {} } }