---
title: "Get dataset version"
method: GET
path: "/v1/datasets-v2/{datasetId}/versions/{versionId}"
tags: ["Datasets v2"]
---

# Get dataset version

`GET /v1/datasets-v2/{datasetId}/versions/{versionId}`

## Request

- Base URL: `https://api.lunary.ai`
- URL: `https://api.lunary.ai/v1/datasets-v2/{datasetId}/versions/{versionId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/lunary/apis/lunary-api/docs/v1/datasets-v2/:datasetId/versions/:versionId/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `datasetId` string, uuid, required
- `versionId` string, uuid, required

## Response `200`

Dataset version with items

- object
  - `version` DatasetV2Version
    - `id` string, uuid
    - `datasetId` string, uuid
    - `versionNumber` integer
    - `createdAt` string, date-time
    - `createdBy` string, uuid, nullable
    - `restoredFromVersionId` string, uuid, nullable
    - `name` string, nullable
    - `description` string, nullable
    - `itemCount` integer
  - `items` DatasetV2VersionItem[]
    - `id` string, uuid
    - `versionId` string, uuid
    - `datasetId` string, uuid
    - `itemIndex` integer
    - `input` string
    - `groundTruth` string, nullable
    - `output` string, nullable
    - `sourceItemId` string, uuid, nullable
    - `sourceCreatedAt` string, date-time, nullable
    - `sourceUpdatedAt` string, date-time, nullable

---

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