Use the oevents CLI to export data
The oevents CLI will stop working after Amazon S3 is decommissioned.
oevents downloads data from Amazon S3 only. Starting November 30, 2026, Optimizely will stop delivering Experimentation Events Export through Amazon S3, and oevents will no longer be able to download your data.
Migrate to Google Cloud Storage using the Authentication APIAuthentication API with the Google Cloud CLI (gcloud storage). Google Cloud Storage is available to all customers today.
oevents wraps the Authentication APIAuthentication API and the AWS CLI so you can list and download Experimentation Events Export data with one command. Use it when you want a download script that runs without code. Use the Authentication API directly if you need to integrate the credential exchange into your own pipeline.
The oevents CLI is a Bash script that runs on macOS and most GNU/Linux distributions. For source code and contribution guidelines, see the oevents GitHub repository.
The oevents CLI supports Amazon S3 only. For Google Cloud Storage, use the Authentication APIAuthentication API with the Google Cloud CLI (gcloud storage).
Prerequisites
Install the following tools before running oevents:
- jq
- curl
- AWS CLI version 2 or later
oevents does not run on Windows. Use the Authentication APIAuthentication API directly, or run oevents through Windows Subsystem for Linux 2 (WSL2).
Download the CLI
Download the oevents CLI as a ZIP archive from the GitHub repository.
Install the CLI
From the directory containing oevents, make the script executable:
chmod +x oeventsRun oevents with an explicit path to the script:
./oevents helpTo run oevents from anywhere, copy it to a directory on your PATH:
sudo cp oevents /usr/local/bin/
oevents helpWhen oevents is installed, generate the Personal Access Token it uses to authenticate.
Generate a Personal Access Token
A Personal Access Token (PAT) is the credential oevents uses to call the Authentication API on your behalf. Generate one in Optimizely by following Manage your API tokensManage your API tokens.
Store your PAT in the OPTIMIZELY_API_TOKEN environment variable:
export OPTIMIZELY_API_TOKEN=PERSONAL_ACCESS_TOKENAuthenticate
Acquire temporary AWS credentials:
oevents authList and download data
List the available data for a given event type and date:
oevents ls \
--type events \
--date 2025-07-01Download decision data for an experiment within a date range:
oevents load \
--type decisions \
--start 2025-07-01 \
--end 2025-07-05 \
--experiment 12345Dates and times in oevents commands are interpreted as UTC.