---
title: "List all events relating to a dataset, edition, or version for static datasets only."
method: GET
path: "/dataset-events"
tags: ["Private"]
---

# List all events relating to a dataset, edition, or version for static datasets only.

`GET /dataset-events`

## Request

- Base URL: `https://api.beta.ons.gov.uk/v1`
- URL: `https://api.beta.ons.gov.uk/v1/dataset-events`
- Auth: one of:
  - none
  - API key in header `Authorization`

Returns a list of events for a dataset, edition, or version for static datasets only.

## Query parameters

- `id` string
- `edition` string
- `after` string, date-time
- `before` string, date-time
- `limit` integer
- `offset` integer

## Response `200`

The list of change audit events for a dataset or edition.

- AuditEventsList: The list of change events which form the change and audit log for a dataset or edition.
  - `count` integer: The number of items returned.
  - `limit` integer: The number of items requested.
  - `offset` integer: The offset of the first item to retrieve, starting at 0. Use this parameter as a pagination mechanism along with the limit parameter
  - `total_count` integer: The total number of items available.
  - `items` AuditEvent[]
    - `created_at` string, date-time: The date and time the event occurred.
    - `requested_by` object, required: The user who made the request.
      - `id` string, required: The ID of the user.
      - `email` string, email: The email of the user. This is only populated if the user is a human user.
    - `action` 'CREATE' | 'READ' | 'UPDATE' | 'DELETE', required: The action taken by the user.
    - `resource` string, required: The path of the API resource that was called.
    - `data` object, required: The state of the resource following a change action, or the state of the record when the user viewed it. This will be either a `Dataset` or `Version` object, but as OpenAPI 2.0 does not support `oneOf`, no schema is shown.

## Other responses

- `400`: Invalid query parameter
- `401`: Unauthorised to access endpoint
- `404`: No dataset or editions were found
- `500`: Failed to process the request due to an internal error

---

[API](https://skmtc.dev/office-of-national-statistics/apis/dataset-api.md) - [All operations](https://skmtc.dev/office-of-national-statistics/apis/dataset-api/llms.txt) - [OpenAPI document](https://skmtc.dev/office-of-national-statistics/apis/dataset-api/revisions/a2947a13d675?raw)
