Skip to main content
Opik Documentation

Search documentation

Type to search this documentation.

Delete dataset items

POST/v1/private/datasets/items/deleteDelete dataset items

Delete dataset items using one of two modes:

  1. Delete by IDs: Provide 'item_ids' to delete specific items by their IDs
  2. Delete by filters: Provide 'dataset_id' with optional 'filters' to delete items matching criteria

When using filters, an empty 'filters' array will delete all items in the specified dataset.

Request body

application/json
objectDatasetItemsDelete

Request to delete multiple dataset items

batch_group_idstring · uuid

Optional batch group ID to group multiple delete operations into a single dataset version. If null, mutates the latest version instead of creating a new one.

dataset_idstring · uuid

Dataset ID to scope the deletion. Required when using 'filters'. Mutually exclusive with 'item_ids'.

filtersarray of object

Filters to select dataset items to delete within the specified dataset. Must be used with 'dataset_id'. Mutually exclusive with 'item_ids'. Empty array means 'delete all items in the dataset'.

Show child attributes
Show array items

Filters to select dataset items to delete within the specified dataset. Must be used with 'dataset_id'. Mutually exclusive with 'item_ids'. Empty array means 'delete all items in the dataset'.

fieldstring
keystring
operatorstring

one of "contains", "not_contains", "starts_with", "ends_with", "=", "!=", ">", ">=", "<", "<=", "is_empty", "is_not_empty", "in", "not_in"

valuestring
item_idsarray of string · uuid

List of dataset item IDs to delete (max 1000). Use this to delete specific items by their IDs. Mutually exclusive with 'dataset_id' and 'filters'.

maxItems 1000 · minItems 1 · uniqueItems true

Show child attributes

maxItems 1000 · minItems 1 · uniqueItems true

Example request
{
  "batch_group_id": "00000000-0000-0000-0000-000000000000",
  "dataset_id": "00000000-0000-0000-0000-000000000000",
  "filters": [
    {
      "field": "string",
      "key": "string",
      "operator": "!=",
      "value": "string"
    }
  ],
  "item_ids": [
    "00000000-0000-0000-0000-000000000000"
  ]
}

Responses

204No content
400Bad request - invalid parameters or conflicting fields
Documentation menu