Skip to main content
Opik Documentation

Search documentation

Type to search this documentation.

Apply changes to dataset items

POST/v1/private/datasets/{id}/items/changesApply changes to dataset items

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.

Parameters

idstring · uuidpathrequired
overridebooleanquery

default false

Request body

application/json
objectDatasetItemChanges_Public
Example request
{}

Responses

201Version created successfullyapplication/json
objectDatasetVersion_Public
change_descriptionstring
created_atstring · date-time
created_bystring
dataset_idstring · uuid
evaluatorsarray of object

Default evaluators for items in this version

Show child attributes
Show array items

Default evaluators for items in this version

configobjectrequired
namestringrequired

minLength 1

typestringrequired

one of "llm_judge", "code_metric"

execution_policyobject

Default execution policy for items in this version

Show child attributes
pass_thresholdinteger · int32

maximum 100 · minimum 1

runs_per_iteminteger · int32

maximum 100 · minimum 1

idstring · uuid
is_latestboolean

Indicates whether this is the latest version of the dataset

items_addedinteger · int32

Number of items added since last version

items_deletedinteger · int32

Number of items deleted since last version

items_modifiedinteger · int32

Number of items modified since last version

items_totalinteger · int32

Total number of items in this version

last_updated_atstring · date-time
last_updated_bystring
metadataobject
tagsarray of string

uniqueItems true

Show child attributes

uniqueItems true

version_hashstring
version_namestring

Sequential version name formatted as 'v1', 'v2', etc.

Example response
{
  "change_description": "string",
  "created_at": "2026-06-09T00:00:00Z",
  "created_by": "string",
  "dataset_id": "00000000-0000-0000-0000-000000000000",
  "evaluators": [
    {
      "config": {},
      "name": "string",
      "type": "code_metric"
    }
  ],
  "execution_policy": {
    "pass_threshold": 0,
    "runs_per_item": 0
  },
  "id": "00000000-0000-0000-0000-000000000000",
  "is_latest": true,
  "items_added": 0,
  "items_deleted": 0,
  "items_modified": 0,
  "items_total": 0,
  "last_updated_at": "2026-06-09T00:00:00Z",
  "last_updated_by": "string",
  "metadata": {
    "additionalProp1": "string"
  },
  "tags": [
    "string"
  ],
  "version_hash": "string",
  "version_name": "string"
}
400Bad Requestapplication/json
objectErrorMessage_Public
codeinteger · int32
detailsstring
messagestring
Example response
{
  "code": 0,
  "details": "string",
  "message": "string"
}
404Dataset or version not foundapplication/json
objectErrorMessage_Public
codeinteger · int32
detailsstring
messagestring
Example response
{
  "code": 0,
  "details": "string",
  "message": "string"
}
409Version conflict - baseVersion is not the latestapplication/json
objectErrorMessage_Public
codeinteger · int32
detailsstring
messagestring
Example response
{
  "code": 0,
  "details": "string",
  "message": "string"
}
Documentation menu