Endpoints reference
Create an export job
Section titled Create an export jobPOST /v1/exports
This endpoint allows for creating a new export job.
Request parameters
-
name string Required
The name of the export. Must not be empty.
-
format string Required
The file format of the export output.
Possible values:
JSONL
, orCSV
. -
scope string (<= 255 chars)
The scope of the export.
-
frequency object Required
The frequency of the export.
value string
The frequency value.
Possible values:
once
,daily
, orhourly
.dateRange.from string
Required only if frequency.value is “once”. The value must be a valid ISO 8601 date string. It should be anterior to frequency.dateRange.to, but not anterior to the project data retention period
dateRange.to string
Required only if frequency.value is “once”. The value must be a valid ISO 8601 date string. It should be posterior but not more than 7 days after frequency.dateRange.from.
-
fields object Required
The list of fields to export.
To list the exportable fields for a given scope, see the dedicated endpoint.fieldName string Required
A valid
fieldName
corresponding to the name property of the fields that can be listed via the /v1/exportable-fields endpoint. You cannot specify afieldName
more than once, except for the special valuescustom_var
anddynamic_var
(used to export custom or dynamic variables).aliasName string
An alias that will be used to rename the exported field in the output file.
customVarPosition string
Required only if
custom_var
is specified asfieldName
. The custom variable position. Must be between 1 and 20 inclusive. To learn more about custom variables, see Sending custom vars. To list custom variables available on the authenticated project, see the /v1/custom_vars endpoint.dynamicVarKey string
Required only if
dynamic_var
is specified asfieldName
. The dynamic variable key. To learn more about dynamic variables, see Sending dynamic vars. To list dynamic variables available on the authenticated project, see the /v1/dynamic_var_keys endpoint. -
deviceLabel string Required
A device filter.
Possible values:
all
,desktop
,mobile
, ortablet
. -
segmentId string
A valid
segmentId
. If no segment is provided, the data for all users will be exported. To retrieve the list of available segments for the project, you can call the /v1/segment endpoint.
Request example 1
Request example 2
Response example
Get the list of all export jobs
Section titled Get the list of all export jobsGET /v1/exports
This endpoint provides the list of all the available export jobs (be they in status active, suspended, computing or completed).
Query parameters
-
format string
To filter based on the export format (see Enumerations)
-
frequency string
To filter based on the export frequency (see Enumerations)
-
limit integer
To change the page size of results (25 by default, 100 max).
-
order string
To change the order of the results list (“ASC” or “DESC”, “DESC” by default).
Ordering is based on thejobId
. -
page integer
The page of results to retrieve.
-
scope string
To filter based on the job scope (see Enumerations).
-
state string
To filter based on the job status (see Enumerations)
Request example
Response example
nextFrom
and nextTo
represents the next date range that will be extracted, while lastRunTime
and nextRunTime
indicates when the last and next execution started / will start.
Get the list of all successful job runs
Section titled Get the list of all successful job runsGET /v1/exports/successful-runs
This endpoint provides the list of all the jobs runs that completed successfully. Use it to find which jobs have generated extraction files to be downloaded.
Query parameters
-
page integer
The page of results to retrieve.
-
order string
To change the order of the results list (“ASC” or “DESC”, “DESC” by default).
Ordering is based on thejobId
. -
limit integer
To change the page size of results (25 by default, 100 max).
Request example
Response example
Get a specific job
Section titled Get a specific jobGET /v1/exports/{jobId}
This endpoint allows for retrieving a specific job with its ID.
Path parameters
-
jobId integer Required
The Job ID.
Request example
Response example
nextFrom
and nextTo
represents the next date range that will be extracted, while lastRunTime
and nextRunTime
indicates when the last and next execution started / will start.
Get the list of all job runs of a job
Section titled Get the list of all job runs of a jobGET /v1/exports/{jobId}/runs
This endpoint provides the list of all the job runs related to a specific job.
Path parameters
-
jobId integer Required
The Job ID.
Query parameters
-
limit integer
To change the page size of results (25 by default, 100 max).
-
order string
To change the order of the results list (“ASC” or “DESC”, “DESC” by default).
Ordering is based on thejobId
. -
page integer
The page of results to retrieve.
-
state string
To filter based on the job status (see Enumerations).
Request example
Response example
Get a specific job run
Section titled Get a specific job runGET /v1/exports/{jobId}/runs/{runId}
This endpoint allows for retrieving a specific job run with its ID. The response includes all the extraction files available for download if any (in the files
field). The files can be downloaded via the provided URL in the url
field. Files will not be available for download after the expirationDate
.
Path parameters
-
jobId integer Required
The Job ID.
-
runId integer Required
The Job Run ID.
Request example
Response example
Get the list of all exportable fields
Section titled Get the list of all exportable fieldsGET /v1/exportable-fields
This endpoint allows for retrieving all fields that can be extracted for a specified scope (the list of fields will depend on the scope).
Query parameters
-
scope string Required
To filter based on the job scope (see Enumerations)
Request example
Response example
Get the list of custom variables
Section titled Get the list of custom variablesGET /v1/custom-vars
This endpoint allows for retrieving all the custom variables available on a project. To learn more about custom variables, see Sending custom vars.
Parameters
No parameters.
Request example
Response example
Get the list of dynamic variables
Section titled Get the list of dynamic variablesGET /v1/dynamic-var-keys
This endpoint allows for retrieving all the dynamic variables available on a project between two dates. To learn more about dynamic variables, see Sending dynamic variables.
Query parameters
-
from ISO 8601 date string
Start date of the query date range.
-
to ISO 8601 date string
End date of the query date range.