---
title: "Get dataset by ID"
method: GET
path: "/datasets/{dataset_id}"
tags: ["Datasets"]
---

# Get dataset by ID

`GET /datasets/{dataset_id}`

## Request

- Base URL: `https://api.axiom.co/v2`
- URL: `https://api.axiom.co/v2/datasets/{dataset_id}`
- Auth: OAuth 2
  - Authorization code: `https://accounts.google.com/o/oauth2/v2/auth`
  - Token URL: `https://www.googleapis.com/oauth2/v4/token`
- TypeScript: <https://skmtc.dev/axiom/apis/axiom-public-api/docs/datasets/:dataset_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves a dataset by its name.

## Path parameters

- `dataset_id` string, required

## Query parameters

- `exclude` 'labels'

## Response `200`

Dataset.

- Dataset
  - `canWrite` boolean: Whether this dataset has write access
  - `created` string, date-time, required: The RFC3339-formatted time when the dataset was created.
  - `createdByAgent` boolean: true when the MCP server created this dataset
  - `description` string, required: Dataset description
  - `edgeDeployment` string: Edge deployment of the dataset
  - `edgeDeploymentUrl` string: URL of the edge deployment
  - `id` string, required: Dataset ID
  - `kind` 'otel:metrics:v1' | 'otel:traces:v1' | 'otel:logs:v1' | 'axiom:events:v1', required: The kind of the dataset
  - `labelIds` LabelID[], required: IDs of labels assigned to this dataset.
  - `labelNames` string[], required: Names of assigned labels, including with exclude=labels; [] when unassigned.
  - `labels` Label[]: Resolved labels assigned to this dataset.
    - `color` LabelColor, required
      - `name` 'red' | 'coral' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'blue' | 'iris' | 'purple' | 'pink', required
      - `type` 'palette', required
    - `description` string, nullable
    - `id` string, required
    - `name` string, required
  - `mapFields` string[]
  - `name` string, required: Unique dataset name
  - `reclaimableFields` integer: Number of unused fields a vacuum can reclaim, when the dataset is a vacuum candidate
  - `retentionDays` integer: Number of days to retain data in the dataset
  - `sharedByOrg` string: ID of the org that shared this resource, if it's shared
  - `updatedAt` string, date-time, required: The RFC3339-formatted time when the dataset was last updated.
  - `useRetentionPeriod` boolean: Whether to use the retention period
  - `vacuumCandidate` boolean: Whether the dataset has unused fields that a vacuum can reclaim
  - `who` string, required: Name of the dataset creator

## Other responses

- `403`: Forbidden
- `404`: Not found

## Changes

- **2026-11-02** (v2) `e3baf3b85e8d`: 2 info
  - added the optional property `createdByAgent` to the response with the `200` status
  - added the required property `labelNames` to the response with the `200` status
- **2026-10-14** (v2) `8920e1697284`: 5 info
  - added the new optional `query` request parameter `exclude`
  - added the optional property `labels` to the response with the `200` status
  - added the optional property `reclaimableFields` to the response with the `200` status
  - added the optional property `vacuumCandidate` to the response with the `200` status
  - …1 more

[Operation history](https://skmtc.dev/axiom/apis/axiom-public-api/changes/datasets/:dataset_id/get.md)

---

[API](https://skmtc.dev/axiom/apis/axiom-public-api.md) - [All operations](https://skmtc.dev/axiom/apis/axiom-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/axiom/apis/axiom-public-api/revisions/7e39a295e3ba?raw)
