Scheduled data export

Properties

Properties
scheduled_data_export_id string
Must be a UUID. The unique identifier of the scheduled data export.
environment string
The dataset used by the scheduled data export. Either sandbox or production.
created_at string
The time at which the scheduled data export was created.
created_by object
An object indicating the user or API key that created the scheduled data export. See Authentication.
status string
The current status of the scheduled data export. One of active, paused, or archived.
name string
The name of the scheduled data export.
frequency object
The frequency at which the scheduled data export runs. See below for more details. Must be one of the below.

Daily frequency

time_of_day string
The time of day to run the export, in HH:mm format.

Weekly frequency

time_of_day string
The time of day to run the export, in HH:mm format.
day_of_week string
The day of week to run the export. One of monday, tuesday, wednesday, thursday, friday, saturday, or sunday.

Monthly frequency

time_of_day string
The time of day to run the export, in HH:mm format.
day_of_month integer
The day of month to run the export on, from 1 to 31. Note: if the day of month falls after month end (i.e., on the 31st in a month with only 30 days), the export will be run on the last day of the month.

adapter object
The adapter used to send the export once it's compiled. See below for more details. Must be one of the below.

Sftp adapter

type string
The type of adapter. In this case, sftp.
host string
The SFTP IP address or hostname.
port number
The port number to connect to on the host. Defaults to 22 if not provided.
path string
The path on the server to store the resulting export in.
username string
The username to use when authenticating on the SFTP server. Defaults to anonymous authentication if not provided.
password string
The password to use when authenticating on the SFTP server. Defaults to anonymous authentication if not provided.

Https adapter

type string
The type of adapter. In this case, https.
url string
The HTTPS URL to send the export file to.
headers string
The HTTP headers for the request.
batch_size integer
The number of entities to include per request, if streaming is disabled. Defaults to 10000 if not provided.
stream_request boolean
Indicates whether the request should be batched (false) or streamed in one request (true).

S3 adapter

type string
The type of adapter. In this case, s3.
region string
The S3 bucket region.
bucket_name string
The name of the S3 bucket.
bucket_path string
The path of the S3 bucket to store the resulting export to, with a trailing slash. This is used to generate a bucket key e.g. folder/subfolder/.
secret_access_key string
An AWS secret access key with permission to read from and write to the bucket.
access_key_id string
An AWS access key ID with permission to read from and write to the bucket.

export_type string
The type of scheduled data export. Only policy_export is currently supported.
data_range string
The range used to capture data for the export. One of today, week_to_date, month_to_date, since_last_run, or full.
latest_run object
The latest run for the scheduled data export, if one exists. See below for more details.

Example

{
  "scheduled_data_export_id": "4ab082f2-864e-4bcf-bc17-75664a25f2e1",
  "environment": "sandbox",
  "created_at": "2019-03-15T09:55:13.627Z",
  "created_by": {
    "type": "api_key",
    "id": "313f7511-c16a-4fdb-ba49-25a80a9b571c",
    "owner_id": "da20903b-7f0d-4318-96bd-6df78514e2fd"
  },
  "status": "active",
  "name": "Daily policies export",
  "frequency": {
    "type": "daily",
    "time_of_day": "09:00"
  },
  "adapter": {
    "type": "sftp",
    "host": "localhost",
    "username": "someuser",
    "path": "/some/path/"
  },
  "export_type": "policy_export",
  "data_range": "since_last_run"
}