---
title: "Compare latest version with draft"
method: GET
path: "/v1/private/datasets/{id}/versions/diff"
tags: ["Datasets"]
---

# Compare latest version with draft

`GET /v1/private/datasets/{id}/versions/diff`

Compare the latest committed dataset version with the current draft state. This endpoint provides insights into changes made since the last version was committed. The comparison calculates additions, modifications, deletions, and unchanged items between the latest version snapshot and current draft.

## Path parameters

- `id` string, uuid, required

## Response `200`

Diff computed successfully

- DatasetVersionDiff
  - `from_version` string
  - `to_version` string
  - `statistics` DatasetVersionDiffStats
    - `itemsAdded` integer
    - `itemsModified` integer
    - `itemsDeleted` integer
    - `itemsUnchanged` integer

## Other responses

- `404` — Version not found

---

[API](https://skmtc.net/comet-ml/apis/opik-rest-api.md) · [All operations](https://skmtc.net/comet-ml/apis/opik-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/comet-ml/opik-rest-api/revisions/4ed2fbc97cc3/schema)
