# 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.

Base URL: `https://www.comet.com/opik/api`

Tags: `Datasets`

## Authorization

This operation requires no authorization.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` (uuid) | Yes | — |

## Responses

| Status | Description | Media type |
| --- | --- | --- |
| `200` | Diff computed successfully | `application/json` |
| `404` | Version not found | — |

### Example response: 200 — Diff computed successfully

```json
{
  "from_version": "string",
  "statistics": {
    "itemsAdded": 0,
    "itemsDeleted": 0,
    "itemsModified": 0,
    "itemsUnchanged": 0
  },
  "to_version": "string"
}
```

## Related pages

- [Activate a pairing session](./activatepairingsession.md)
- [Add blueprint to existing config](./updateagentconfig.md)
- [Add items to annotation queue](./additemstoannotationqueue.md)
- [Add span comment](./addspancomment.md)
- [Add span feedback score](./addspanfeedbackscore.md)
- [Add thread comment](./addthreadcomment.md)
- [Add trace comment](./addtracecomment.md)
- [Add trace feedback score](./addtracefeedbackscore.md)
- [Agent Configs](./tags/agent-configs.md)
- [Agent Insights](./tags/agent-insights.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
