exportData

Exports raw data to downloadable files. Data is split into roughly 256 MB files, and is not necessarily ordered. Exports can be made in JSON or CSV format. For JSON format, each file contains 1 line per session, with each session JSON-encoded. For CSV format, data is split into separate files for sessions, states, events, event parameters, and user attributes.

Note that for daily exports, you may see some variation in sessions data results. This is because sessions data can come in up to 8 days after a user's last interaction with your app.

Export files are automatically deleted 24 hours after export occurs. Data becomes available to export every 2 hours, and only for complete sessions. You cannot export data that has become available more than 60 days ago. You may only export data 24 times per day. Exports with invalid arguments do not count towards this limit.

Use getExportResults with the returned jobId to get the results.

Query Params
string
required
Defaults to YOUR_APP_ID

The application ID. To find yours, select your app in the navigation column, and click Manage Apps. Then click Keys & Settings.

string
required
Defaults to YOUR_DATA_EXPORT_KEY

The Data Export key for your Leanplum App.

string
enum
required
Defaults to 1.0.6

The version of the Leanplum API to use. The current version is 1.0.6.

Allowed:
string
required

First date in range to include in PDT/PST (format: YYYYmmdd). Example: 20140223.

string

The format to export data. Can be either json or csv. Default: json.

string

Last date in range to include in PDT/PST (format: YYYYmmdd). Defaults to startDate if not provided. Example: 20140223.

number

First time (when data became available) to include (seconds since midnight UTC on January 1, 1970). If not provided, accepts all times before endTime, or all times if endTime is also not provided. The main use is to set this to the last time you exported data to only get the new data since your last export.

number

Last time (when data became available) to include (seconds since midnight UTC on January 1, 1970). If not provided, accepts all times after startTime, or all times if startTime is also not provided.

string

URL to POST a response to when the export completes. The response is the response format of getExportResults.

string

The name of an AWS S3 bucket to copy exported files to.

string

The AWS Access ID used to authenticate to S3. Required if s3BucketName is set.

string

The AWS Secret Access Key used to authenticate to S3. Required if s3BucketName is set.

string

An optional prefix of files to write to S3. Example: dirname/ to write files to a directory within the S3 bucket.

boolean

An option to compress the data. Only works when uploading to S3. If set to true, the files will be compressed using gzip before being uploaded.

Response

Language
Credentials
URL
Response
Choose an example:
application/json