The availability of features may depend on your plan type. Contact your Customer Success Manager if you have any questions.
Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Use the oevents CLI to export data

How to export Experimentation Events Export data with the Optimizely Experimentation oevents CLI.

oevents wraps the Authentication 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.

📘

Note

The oevents CLI supports Amazon S3 only. For Google Cloud Storage, use the Authentication API with the Google Cloud CLI (gcloud storage).

Prerequisites

Install the following tools before running oevents:

📘

Note

oevents does not run on Windows. Use the Authentication 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 oevents

Run oevents with an explicit path to the script:

./oevents help

To run oevents from anywhere, copy it to a directory on your PATH:

sudo cp oevents /usr/local/bin/
oevents help

When 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 tokens.

Store your PAT in the OPTIMIZELY_API_TOKEN environment variable:

export OPTIMIZELY_API_TOKEN=PERSONAL_ACCESS_TOKEN

Authenticate

Acquire temporary AWS credentials:

oevents auth

List and download data

List the available data for a given event type and date:

oevents ls \
    --type events \
    --date 2025-07-01

Download decision data for an experiment within a date range:

oevents load \
    --type decisions \
    --start 2025-07-01 \
    --end 2025-07-05 \
    --experiment 12345
📘

Note

Dates and times in oevents commands are interpreted as UTC.