Account Export API
The Marketing Cloud Personalization Account Export API helps you retrieve account-level data from datasets such as segments, engagement scores, change in engagement scores, and customer activity for use in other systems.
Export account data from a Personalization dataset.
Method and Endpoint
GET
/api/dataset/<datasetId>/accounts.< json | csv >
Request URL
https://<accountName>.<instance>.evergage.com/api/dataset/<datasetId>/accounts.< json | csv >
Request Parameters
URL Parameter | Required? | Description |
---|---|---|
accountName | Yes | Your Personalization account name. You can retrieve it by accessing Gears from the Personalization UI and reviewing the URL. For example, if your Gears URL is https://demo.us-1.evergage.com/ , then your account name is demo . |
instance | Yes | Your Personalization instance identifier. You can retrieve it by accessing Gears from the Personalization UI and reviewing the URL. For example, if your Gears URL is https://demo.us-1.evergage.com/ , then your instance identifier is us-1 . |
datasetId | Yes | Name/identifier of the Personalization dataset you are exporting account data from. |
filter | No | Optional Segment name or ID |
start | No | Optional start time in epoch milliseconds used for engagement statistics |
end | No | Optional end time in epoch milliseconds used for engagement statistics |
segmentationId | No | Optional segmentation identifier |
segmentId | No | Optional segment identifier |
pageSize | No | Number of records to return. Returns all records unless specified. |
page | No | Page number of records to show, starting at zero for the first page. Starts at zero unless specified. |
Authorization
Authorization: Basic <base64-encoded-API-token>
The Account Export API uses API tokens to authenticate requests. Your API token must be a strict Base64 encoding of your API Key ID and its API Secret Key, separated by a colon. You can use an existing API token if it has the required permissions or ask an account administrator to generate a new one from the Personalization UI by navigating to Security > API Tokens > Create Token. For more information on API tokens, see Personalization API Tokens on the Salesforce Help site.
Alternatively, if you use cURL to interact with the API, you can send your API Key ID and its API Key Secret using the -u "apiKeyId:apiKeySecret"
command-line option. cURL automatically converts the apiKeyId:apiKeySecret
pair into a Base64-encoded string and adds the Authorization: Basic <base64-encoded-API-token>
to the request header. For an example of how to pass your API credentials in a cURL request, refer to the Example section in this article.
Example
The following is an example GET request sent using cURL that retrieves account data in the JSON format from the specified Personalization dataset.
The following example request passes API credentials using the -u
command-line option.
The preceding example cURL request generates the following example response in the JSON format.