Profile in segment event export
Request profile in segment event export. The export can be requested for specific segment or based on event dates and the data can include attributes, tags, events and topic state.
segment_filter request parameter is provided, only the profiles from the selected segment are exported, otherwise the export file contains all profiles on the account.
events explicitly declared in the corresponding request parameters are exported. Even though you're only interested in events, you still need to request at least one attribute or tag for the profiles to even show up in the export file.
start_at (mandatory) and
end_at parameters to specify the time period for the exported events. When
end_at is not provided in a request, it is defaulted to one week after
How to use
Once executed successfully, this endpoint returns a poll URL that is valid for 1 day.
Call this URL repeatedly with exponential back-off using the same authentication token as for the other APSIS One API calls. Until the result is ready, you will keep getting
HTTP 404 Not Found response status code.
As soon as the export file is ready, the poll URL returns
HTTP 200 OK and starts streaming a export file as a response.
HTTP 410 Gone means that the file is no longer available or the ID used is invalid.
In rare cases when the export processing has failed, calling the poll URL returns
HTTP 503 Service Unavailable. If that happens, please request a new export with the
By default the export file is an uncompressed JSON so your code should treat it as
.json. If you prefer a compressed export, provide
Accept-Encoding: gzip request header when calling the poll URL. The response will then contain
Content-Encoding: gzip header and you will be able to handle the file as
You can download the same export multiple times using the same poll URL with or without compression.
The export file is in the JSON format.
On the top level there is a JSON dictionary with profiles. The keys in this dictionary are profile export keys.
For each profile, export file contains
sections JSON dictionary. The keys in this dictionary are section IDs. Use "Get sections" endpoint of this API to map these IDs to the specific section definitions.
Each section contains both, attributes and tags, inside the
attributes JSON dictionary. The keys in this dictionary are IDs of the attributes and tags. Use "Get attributes" and "Get tags" endpoints of this API to map these IDs to the specific attribute and tag definitions. The objects in this dictionary have the following properties:
The data type of this property depends on the attribute type. For tags the value is always
nulland the sheer fact that the attribute exists in the export file means that the corresponding profile was tagged with this particular tag.
If any event type has been requested for a specified section, the corresponding section object also contains
events JSON array. Each object in this array represents a single event and contains the following information:
ID for the event assigned by the event source (Email Tool). The same
correlationIdvalue may be repeated if the event has been sent multiple times due to a retry logic.
Time of the event in milliseconds since Unix epoch reported by the event source. This feature was introduced at the beginning of 2020 so events prior to that may have
0. The value of
0is also possible when the event source did not specify the event time.
Event version ID. Use "Get events" endpoint of the API to map these IDs to the specific event definitions.
Time of the event in milliseconds since Unix epoch as seen on Audience server when it received the event.
Data specific to a particular event type as defined by "Get events" endpoint of the API
Maximum export time window for events is three months. Validated when requesting an export.
The export file can include up to 75 attributes and 25 tags. Validated when requesting an export.
Pending export count limit. If reached,
HTTP 429 Too Many Requests is returned.
Maximum file size limit. If you request an export with very large data set, i.e. many attributes or large time window that results in many events, you may receive a status of
error when attempting to request or download an export. You can then retry the export request aiming at a smaller data subset.
Usually the errors in processing are caused by:
- using too complex segments
- providing too many attributes and/or tags
- providing too many event types