---
title: "Apply changes to dataset items"
method: POST
path: "/v1/private/datasets/{id}/items/changes"
tags: ["Datasets"]
---

# Apply changes to dataset items

`POST /v1/private/datasets/{id}/items/changes`

Apply delta changes (add, edit, delete) to a dataset version with conflict detection.

This endpoint:
- Creates a new version with the applied changes
- Validates that baseVersion matches the latest version (unless override=true)
- Returns 409 Conflict if baseVersion is stale and override is not set

Use `override=true` query parameter to force version creation even with stale baseVersion.

Set 'copy_from_dataset_id' and 'copy_from_version_id' together on the request body to read
carry-forward rows from the supplied (dataset, version) pair instead of the destination's
prior version. When the fields are null, carry-forward rows are read from the destination's
prior version.

## Path parameters

- `id` string, uuid, required

## Query parameters

- `override` boolean

## Request body

- DatasetItemChangesPublic

## Response `201`

Version created successfully

- DatasetVersionPublic
  - `id` string, uuid
  - `dataset_id` string, uuid
  - `version_hash` string
  - `tags` string[]
  - `is_latest` boolean — Indicates whether this is the latest version of the dataset
  - `version_name` string — Sequential version name formatted as 'v1', 'v2', etc.
  - `items_total` integer — Total number of items in this version
  - `items_added` integer — Number of items added since last version
  - `items_modified` integer — Number of items modified since last version
  - `items_deleted` integer — Number of items deleted since last version
  - `change_description` string
  - `metadata` object
  - `evaluators` EvaluatorItemPublic[] — Default evaluators for items in this version
    - `name` string, required
    - `type` 'llm_judge' | 'code_metric', required
    - `config` JsonNodePublic, required
  - `execution_policy` ExecutionPolicyPublic — Default execution policy for items in this version
    - `runs_per_item` integer
    - `pass_threshold` integer
  - `created_at` string, date-time
  - `created_by` string
  - `last_updated_at` string, date-time
  - `last_updated_by` string

## Other responses

- `400` — Bad Request
- `404` — Dataset or version not found
- `409` — Version conflict - baseVersion is not the latest

---

[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/versions/4ed2fbc97cc3/schema)
