Events export
EARLY ACCESSIf you want to use the customer activity from all your events in an external system or application, the Events Export API enables you to extract events data. Set up your export in three simple steps. Be aware that exported events are subject to the data retention policy.
Set up Amazon S3 bucket
The Events Export API uploads events data as compressed files to an Amazon S3 cloud storage.
To set up your S3 bucket:
- Create an Amazon Web Services S3 bucket for your exports.
- Note your bucket name and region for the next steps.
For detailed instructions, see the Amazon AWS documentation (opens in a new tab).
Configure permissions
Once you have set up your S3 bucket, use AWS Identity and Access Management (IAM) to create a role for the Events Export application to access the S3 bucket.
The role requires two policies:
- S3 access policy - Allow access to your S3 bucket
- Trust policy - Allow the Events Export application user to obtain a temporary session using the AWS Security Token Service
Trust policy JSON:
{
"Effect":"Allow",
"Principal":{
"AWS":[
"arn:aws:iam::415293638486:user/infobip-people-event-export-user"
]
},
"Action":"sts:AssumeRole",
"Condition":{
"StringEquals":{
"sts:ExternalId":"infobip-people-event-export"
}
}
}After you have set the appropriate permissions, your S3 bucket will be ready to accept exported files from Infobip.
Export your events
Submit a request to export events following the schema defined in the Events Export API documentation (opens in a new tab).
The Events Export API processes requests asynchronously. You can check your request status (opens in a new tab) to see if it has been completed.
Once the status is COMPLETED_SUCCESSFULLY, the export files containing your events are uploaded to the designated S3 bucket.
Export file format
Exported event files have the following characteristics:
- Format: Compressed
.gzipfiles - Filename:
<requestId>-events-<startTime>-<endTime>.json.gz - Content: Maximum 50,000 rows per file, each row contains one event in JSON format
You can specify the directory path of the S3 bucket where files are saved.
Event schema
Each exported event contains mandatory fields and optional event-specific properties.
Mandatory fields
| Field name | Value format | Description |
|---|---|---|
definitionId | String | Definition (type) of the event. See Get list of event definitions (opens in a new tab). |
personId | String | Unique identifier of the person profile. |
externalPersonId | String | External identifier of the person profile. |
timestamp | ISO 8601 | Time when the event occurred. |
properties | Object | Event-specific properties defined for the event. |