---
title: Use the oevents CLI to export data
slug: experimentation-strategy/data-docs/use-the-oevents-cli-to-export-data
createdAt: 2026-08-05T20:34:49.000Z
---

:::hint{type="warning"}
**Important**

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 API](docId\:U-fPGtG4TQya8zNG2FAKS) with the Google Cloud CLI (`gcloud storage`). Google Cloud Storage is available to all customers today.
:::

`oevents` wraps the [Authentication API](docId\:U-fPGtG4TQya8zNG2FAKS) and the [AWS CLI](https://aws.amazon.com/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.

:::hint{type="info"}
**Note**

The `oevents` CLI supports Amazon S3 only. For Google Cloud Storage, use the [Authentication API](docId\:U-fPGtG4TQya8zNG2FAKS) with the Google Cloud CLI (`gcloud storage`).
:::

## Prerequisites

Install the following tools before running `oevents`:

- jq
- curl
- AWS CLI version 2 or later

:::hint{type="info"}
**Note**

`oevents` does not run on Windows. Use the [Authentication API](docId\:U-fPGtG4TQya8zNG2FAKS) 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:

```shell
chmod +x oevents
```

Run `oevents` with an explicit path to the script:

```shell
./oevents help
```

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

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

When `oevents` is installed, generate the [Personal Access Token](docId\:OgHaLPIaYuBcyPUSOmoW_) 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](docId\:XSgXj6g04fNx7I_BHmU-s).

Store your PAT in the `OPTIMIZELY_API_TOKEN` environment variable:

```shell
export OPTIMIZELY_API_TOKEN=PERSONAL_ACCESS_TOKEN
```

## Authenticate

Acquire temporary AWS credentials:

```shell
oevents auth
```

## List and download data

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

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

Download decision data for an experiment within a date range:

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

:::hint{type="info"}
**Note**

Dates and times in `oevents` commands are interpreted as UTC.
:::
