Data Exports

Data exports.

Request a data export of selected resource

Request a data export of selected resource.

SecuritySecretApiKey or JWT
Request
query Parameters
expand
string

Expand a response to get a full related object included inside of the _embedded path in the response. It accepts a comma-separated list of objects to expand. See the expand guide for more info.

Request Body schema: application/json

Data Export Request.

name
required
string

Export name.

format
required
string

Export result format.

Enum: "csv" "json" "json-api" "xml" "pdf"
resource
required
string

The type of resource being exported (e.g. transactions).

object

Export request arguments that can be passed to filter and/or sort the result set. See the arguments guide for more options and examples.

filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields.

sort
string

The collection items sort field and order (prefix with "-" for descending sort).

q
string

The partial search of the text fields.

emailNotification
Array of strings <email>

List of emails to be notified when export is completed.

fields
Array of strings

List of fields to include in the export. See supporting documentation for more info. If omitted, default fields will be included.

object

Exports can reoccur according to your own schedule.

instruction
required
string

RRule RFC 5545 formatted string used for recurring exports.

start
string <date-time>

The date and time when the first recurring scheduled export will occur. Defaults to now.

object

The date range (can be in relative formats). If omitted, all time will be included. See the Date Range guide for more options and examples.

start
required
string

Any valid datetime arguments including relative datetime arguments.

end
required
string

Any valid datetime arguments including relative datetime arguments.

field
string
Default: "createdTime"

The field to apply date range to.

Responses
201

Data export request received.

Response Schema: application/json
name
required
string

Export name.

format
required
string

Export result format.

Enum: "csv" "json" "json-api" "xml" "pdf"
resource
required
string

The type of resource being exported (e.g. transactions).

id
string <= 50 characters

The resource ID. Defaults to UUID v4.

object

Export request arguments that can be passed to filter and/or sort the result set. See the arguments guide for more options and examples.

filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields.

sort
string

The collection items sort field and order (prefix with "-" for descending sort).

q
string

The partial search of the text fields.

emailNotification
Array of strings <email>

List of emails to be notified when export is completed.

fields
Array of strings

List of fields to include in the export. See supporting documentation for more info. If omitted, default fields will be included.

object

Exports can reoccur according to your own schedule.

instruction
required
string

RRule RFC 5545 formatted string used for recurring exports.

start
string <date-time>

The date and time when the first recurring scheduled export will occur. Defaults to now.

userId
string

The ID of the User who requested the data export.

recordCount
integer

The number of records in the export (excluding the header row).

scheduledTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

createdTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

updatedTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

status
string

Status of export request.

Enum: "pending" "queued" "processing" "completed"
Array of LinkSelf (object) or LinkUser (object) or LinkFileDownload (object) or LinkSignedLink (object) [ 1 .. 4 ] items

The links related to resource.

Array ([ 1 .. 4 ] items)
Any of:
rel
required
string

The link type.

Value: "self"
href
required
string

The link URL.

object

The date range (can be in relative formats). If omitted, all time will be included. See the Date Range guide for more options and examples.

start
required
string

Any valid datetime arguments including relative datetime arguments.

end
required
string

Any valid datetime arguments including relative datetime arguments.

field
string
Default: "createdTime"

The field to apply date range to.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

422

Invalid data was sent.

post/data-exports
Request samples
application/json
{
  • "name": "string",
  • "resource": "customers",
  • "format": "csv",
  • "arguments": {
    },
  • "emailNotification": [
    ],
  • "fields": [
    ],
  • "recurring": {
    },
  • "dateRange": {
    }
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "name": "string",
  • "resource": "customers",
  • "format": "csv",
  • "arguments": {
    },
  • "emailNotification": [
    ],
  • "fields": [
    ],
  • "recurring": {
    },
  • "userId": "string",
  • "recordCount": 0,
  • "scheduledTime": "2019-08-24T14:15:22Z",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "status": "pending",
  • "_links": [
    ],
  • "dateRange": {
    }
}

Retrieve a list of data export requests

Retrieve a list of data export requests.

SecuritySecretApiKey or JWT
Request
query Parameters
limit
integer [ 0 .. 1000 ]

The collection items limit.

offset
integer >= 0

The collection items offset.

sort
Array of strings

The collection items sort field and order (prefix with "-" for descending sort).

expand
string

Expand a response to get a full related object included inside of the _embedded path in the response. It accepts a comma-separated list of objects to expand. See the expand guide for more info.

filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields. See the filter guide for more options and examples about this format.

q
string

The partial search of the text fields.

criteria
string

Criteria parameter for requesting a collection.

Responses
200

A list of data export requests was retrieved successfully.

Response Headers
Pagination-Total
integer

Total items count.

Pagination-Limit
integer

Items per page limit.

Pagination-Offset
integer

Pagination offset.

Response Schema: application/json
Array
name
required
string

Export name.

format
required
string

Export result format.

Enum: "csv" "json" "json-api" "xml" "pdf"
resource
required
string

The type of resource being exported (e.g. transactions).

id
string <= 50 characters

The resource ID. Defaults to UUID v4.

object

Export request arguments that can be passed to filter and/or sort the result set. See the arguments guide for more options and examples.

filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields.

sort
string

The collection items sort field and order (prefix with "-" for descending sort).

q
string

The partial search of the text fields.

emailNotification
Array of strings <email>

List of emails to be notified when export is completed.

fields
Array of strings

List of fields to include in the export. See supporting documentation for more info. If omitted, default fields will be included.

object

Exports can reoccur according to your own schedule.

instruction
required
string

RRule RFC 5545 formatted string used for recurring exports.

start
string <date-time>

The date and time when the first recurring scheduled export will occur. Defaults to now.

userId
string

The ID of the User who requested the data export.

recordCount
integer

The number of records in the export (excluding the header row).

scheduledTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

createdTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

updatedTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

status
string

Status of export request.

Enum: "pending" "queued" "processing" "completed"
Array of LinkSelf (object) or LinkUser (object) or LinkFileDownload (object) or LinkSignedLink (object) [ 1 .. 4 ] items

The links related to resource.

Array ([ 1 .. 4 ] items)
Any of:
rel
required
string

The link type.

Value: "self"
href
required
string

The link URL.

object

The date range (can be in relative formats). If omitted, all time will be included. See the Date Range guide for more options and examples.

start
required
string

Any valid datetime arguments including relative datetime arguments.

end
required
string

Any valid datetime arguments including relative datetime arguments.

field
string
Default: "createdTime"

The field to apply date range to.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

404

Resource was not found.

get/data-exports
Request samples
// all parameters are optional
const firstCollection = await api.exports.getAll();

// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'}; 
const secondCollection = await api.exports.getAll(params);

// access the collection items, each item is a Member
secondCollection.items.forEach(file => console.log(exports.fields.status));
Response samples
application/json
[
  • {
    }
]

Retrieve a data export request

Retrieve a data export request.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

query Parameters
expand
string

Expand a response to get a full related object included inside of the _embedded path in the response. It accepts a comma-separated list of objects to expand. See the expand guide for more info.

Responses
200

Data Export request.

Response Headers
Pagination-Total
integer

Total items count.

Pagination-Limit
integer

Items per page limit.

Pagination-Offset
integer

Pagination offset.

Response Schema: application/json
name
required
string

Export name.

format
required
string

Export result format.

Enum: "csv" "json" "json-api" "xml" "pdf"
resource
required
string

The type of resource being exported (e.g. transactions).

id
string <= 50 characters

The resource ID. Defaults to UUID v4.

object

Export request arguments that can be passed to filter and/or sort the result set. See the arguments guide for more options and examples.

filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields.

sort
string

The collection items sort field and order (prefix with "-" for descending sort).

q
string

The partial search of the text fields.

emailNotification
Array of strings <email>

List of emails to be notified when export is completed.

fields
Array of strings

List of fields to include in the export. See supporting documentation for more info. If omitted, default fields will be included.

object

Exports can reoccur according to your own schedule.

instruction
required
string

RRule RFC 5545 formatted string used for recurring exports.

start
string <date-time>

The date and time when the first recurring scheduled export will occur. Defaults to now.

userId
string

The ID of the User who requested the data export.

recordCount
integer

The number of records in the export (excluding the header row).

scheduledTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

createdTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

updatedTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

status
string

Status of export request.

Enum: "pending" "queued" "processing" "completed"
Array of LinkSelf (object) or LinkUser (object) or LinkFileDownload (object) or LinkSignedLink (object) [ 1 .. 4 ] items

The links related to resource.

Array ([ 1 .. 4 ] items)
Any of:
rel
required
string

The link type.

Value: "self"
href
required
string

The link URL.

object

The date range (can be in relative formats). If omitted, all time will be included. See the Date Range guide for more options and examples.

start
required
string

Any valid datetime arguments including relative datetime arguments.

end
required
string

Any valid datetime arguments including relative datetime arguments.

field
string
Default: "createdTime"

The field to apply date range to.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

404

Resource was not found.

get/data-exports/{id}
Request samples
const queuedExport = await api.exports.get({resource: 'transaction', id: 'foobar-001'});
console.log(queuedExport.fields.status);
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "name": "string",
  • "resource": "customers",
  • "format": "csv",
  • "arguments": {
    },
  • "emailNotification": [
    ],
  • "fields": [
    ],
  • "recurring": {
    },
  • "userId": "string",
  • "recordCount": 0,
  • "scheduledTime": "2019-08-24T14:15:22Z",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "status": "pending",
  • "_links": [
    ],
  • "dateRange": {
    }
}

Modify a data export

A data export may be changed as long as it is still pending.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

query Parameters
expand
string

Expand a response to get a full related object included inside of the _embedded path in the response. It accepts a comma-separated list of objects to expand. See the expand guide for more info.

Request Body schema: application/json

Data Export Request.

name
required
string

Export name.

format
required
string

Export result format.

Enum: "csv" "json" "json-api" "xml" "pdf"
resource
required
string

The type of resource being exported (e.g. transactions).

object

Export request arguments that can be passed to filter and/or sort the result set. See the arguments guide for more options and examples.

filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields.

sort
string

The collection items sort field and order (prefix with "-" for descending sort).

q
string

The partial search of the text fields.

emailNotification
Array of strings <email>

List of emails to be notified when export is completed.

fields
Array of strings

List of fields to include in the export. See supporting documentation for more info. If omitted, default fields will be included.

object

Exports can reoccur according to your own schedule.

instruction
required
string

RRule RFC 5545 formatted string used for recurring exports.

start
string <date-time>

The date and time when the first recurring scheduled export will occur. Defaults to now.

object

The date range (can be in relative formats). If omitted, all time will be included. See the Date Range guide for more options and examples.

start
required
string

Any valid datetime arguments including relative datetime arguments.

end
required
string

Any valid datetime arguments including relative datetime arguments.

field
string
Default: "createdTime"

The field to apply date range to.

Responses
200

Data Export was modified.

Response Schema: application/json
name
required
string

Export name.

format
required
string

Export result format.

Enum: "csv" "json" "json-api" "xml" "pdf"
resource
required
string

The type of resource being exported (e.g. transactions).

id
string <= 50 characters

The resource ID. Defaults to UUID v4.

object

Export request arguments that can be passed to filter and/or sort the result set. See the arguments guide for more options and examples.

filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields.

sort
string

The collection items sort field and order (prefix with "-" for descending sort).

q
string

The partial search of the text fields.

emailNotification
Array of strings <email>

List of emails to be notified when export is completed.

fields
Array of strings

List of fields to include in the export. See supporting documentation for more info. If omitted, default fields will be included.

object

Exports can reoccur according to your own schedule.

instruction
required
string

RRule RFC 5545 formatted string used for recurring exports.

start
string <date-time>

The date and time when the first recurring scheduled export will occur. Defaults to now.

userId
string

The ID of the User who requested the data export.

recordCount
integer

The number of records in the export (excluding the header row).

scheduledTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

createdTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

updatedTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

status
string

Status of export request.

Enum: "pending" "queued" "processing" "completed"
Array of LinkSelf (object) or LinkUser (object) or LinkFileDownload (object) or LinkSignedLink (object) [ 1 .. 4 ] items

The links related to resource.

Array ([ 1 .. 4 ] items)
Any of:
rel
required
string

The link type.

Value: "self"
href
required
string

The link URL.

object

The date range (can be in relative formats). If omitted, all time will be included. See the Date Range guide for more options and examples.

start
required
string

Any valid datetime arguments including relative datetime arguments.

end
required
string

Any valid datetime arguments including relative datetime arguments.

field
string
Default: "createdTime"

The field to apply date range to.

201

Data Export was updated.

Response Schema: application/json
name
required
string

Export name.

format
required
string

Export result format.

Enum: "csv" "json" "json-api" "xml" "pdf"
resource
required
string

The type of resource being exported (e.g. transactions).

id
string <= 50 characters

The resource ID. Defaults to UUID v4.

object

Export request arguments that can be passed to filter and/or sort the result set. See the arguments guide for more options and examples.

filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields.

sort
string

The collection items sort field and order (prefix with "-" for descending sort).

q
string

The partial search of the text fields.

emailNotification
Array of strings <email>

List of emails to be notified when export is completed.

fields
Array of strings

List of fields to include in the export. See supporting documentation for more info. If omitted, default fields will be included.

object

Exports can reoccur according to your own schedule.

instruction
required
string

RRule RFC 5545 formatted string used for recurring exports.

start
string <date-time>

The date and time when the first recurring scheduled export will occur. Defaults to now.

userId
string

The ID of the User who requested the data export.

recordCount
integer

The number of records in the export (excluding the header row).

scheduledTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

createdTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

updatedTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

status
string

Status of export request.

Enum: "pending" "queued" "processing" "completed"
Array of LinkSelf (object) or LinkUser (object) or LinkFileDownload (object) or LinkSignedLink (object) [ 1 .. 4 ] items

The links related to resource.

Array ([ 1 .. 4 ] items)
Any of:
rel
required
string

The link type.

Value: "self"
href
required
string

The link URL.

object

The date range (can be in relative formats). If omitted, all time will be included. See the Date Range guide for more options and examples.

start
required
string

Any valid datetime arguments including relative datetime arguments.

end
required
string

Any valid datetime arguments including relative datetime arguments.

field
string
Default: "createdTime"

The field to apply date range to.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

422

Invalid data was sent.

put/data-exports/{id}
Request samples
application/json
{
  • "name": "string",
  • "resource": "customers",
  • "format": "csv",
  • "arguments": {
    },
  • "emailNotification": [
    ],
  • "fields": [
    ],
  • "recurring": {
    },
  • "dateRange": {
    }
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "name": "string",
  • "resource": "customers",
  • "format": "csv",
  • "arguments": {
    },
  • "emailNotification": [
    ],
  • "fields": [
    ],
  • "recurring": {
    },
  • "userId": "string",
  • "recordCount": 0,
  • "scheduledTime": "2019-08-24T14:15:22Z",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "status": "pending",
  • "_links": [
    ],
  • "dateRange": {
    }
}

Delete a data export

Delete an existing data export.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

Responses
204

Request was accepted, but no response body is returned.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

404

Resource was not found.

delete/data-exports/{id}
Request samples
curl -i -X DELETE \
  'https://api-sandbox.rebilly.com/experimental/organizations/unknown/data-exports/{id}' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "status": 401,
  • "title": "string",
  • "detail": "string",
  • "instance": "string"
}