POST /interaction/v1/interactions/journeyhistory/download
Downloads journey history to a file. You can specify which fields are returned.
Historical journey data is retained for 30 days. The maximum file size is 1 GB. For an estimate of the file size and row count, use the journey history download estimate request operation.
Name | Type | Description | Accepted Values |
---|---|---|---|
format | string | The format to use for the output file. The default value is csv . |
|
columns | string | Comma-separated list of columns to download. The default value is TransactionTime, ContactKey, Status, DefinitionId, DefinitionName, ActivityId, ActivityName, ActivityType . |
|
The request body can contain any of the values in this table.
Name | Type | Description | Possible Values |
---|---|---|---|
start | string | The start date and time for the query, in ISO 8601 format. | |
end | string | The end date and time for the query, in ISO 8601 format. | |
contactKeys | array | A comma-separated list of contact keys to retrieve events for. | |
activityTypes | array | A list of activity types to retrieve events for. |
|
definitionIds | array | A list of definition (journey) IDs to retrieve events for. | |
statuses | array | A list of statuses to retrieve events for. |
|
definitionInstanceIds | array | A list of definition instance IDs to retrieve events for. | |
tags | array | A list of tags to retrieve events for. | |
activityIds | array | A list of activity IDs to retrieve events for. |
You can tailor the resulting file to your needs by specifying filters and query values.
The x-direct-pipe: true
header shown in these examples is required.
This example downloads all the contacts that failed to enter the journey between 06:00 and 21:00 UTC.
The response includes the fields that you specified in the columns
parameter in the query path.
You can specify the contacts that are downloaded by changing the value of the status
parameter. This request downloads a list of contacts that didn’t meet the entry criteria in the specified journey. The list is filtered to only include values in the ContactKey
column.
The response includes the values in the ContactKey
column for the records that didn’t meet the entry criteria.
Limit Results by Activity Type
This example downloads the list of contacts successfully injected into the given journey.
The response includes the values in the ContactKey
column for the records that completed the trigger activity.
These tips help optimize your requests by limiting their scope.
- If you only want to download information about a single journey, include the
definitionId
for that journey in the request. - If you only want to download information about a single journey activity, include the
activityId
for the activity in the request. - Use the
columns
query parameter to download only the columns that you need. This step reduces the download file size and the time required to complete the request. - If your request contains filters that limit certain fields to a single value, including that column in the result isn't necessary. For example, if the response only includes failed events—that is, the request body includes
"statuses": ["failed"]
—use thecolumns
query parameter to omit thestatus
column from the result. - Download data from a small time period, such as 1 hour, by using the
start
andend
parameters in the request body. This step results in better performance. Also, because you can’t resume a failed download, downloading smaller units of data can save time and effort if a download fails.