Skip to main content
Opik Documentation

Search documentation

Type to search this documentation.

Batch update traces

PATCH/v1/private/traces/batchBatch update traces

Update multiple traces

Request body

application/json
objectTraceBatchUpdate

Request to batch update multiple traces

idsarray of string · uuidrequired

List of trace IDs to update (max 1000)

maxItems 1000 · minItems 1 · uniqueItems true

Show child attributes

maxItems 1000 · minItems 1 · uniqueItems true

merge_tagsboolean

If true, merge tags with existing tags instead of replacing them. Default: false

updateobjectrequired
Show child attributes
end_timestring · date-time
environmentstring

maxLength 150 · minLength 0

error_infoobject
Show child attributes
exception_typestringrequired

minLength 1

messagestring
tracebackstringrequired

minLength 1

inputobject
Show child attributes
anyOf · 3 options
Option 1object
Option 2array of object
Option 3string
metadataobjectJsonListString ↑
namestring
outputobjectJsonListString ↑
project_idstring · uuid

If null and project_name not specified, Default Project is assumed

project_namestring

If null and project_id not specified, Default Project is assumed

pattern (?s)^\s*(\S.*\S|\S)\s*$

sourcestring

one of "sdk", "experiment", "playground", "optimization", "evaluator"

tagsarray of string

Tags

maxItems 50 · minItems 0 · uniqueItems true

Show child attributes

maxItems 50 · minItems 0 · uniqueItems true

tags_to_addarray of string

Tags to add

maxItems 50 · minItems 0 · uniqueItems true

Show child attributes

maxItems 50 · minItems 0 · uniqueItems true

tags_to_removearray of string

Tags to remove

maxItems 50 · minItems 0 · uniqueItems true

Show child attributes

maxItems 50 · minItems 0 · uniqueItems true

thread_idstring
ttftnumber · double
Example request
{
  "ids": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "merge_tags": true,
  "update": {
    "end_time": "2026-06-09T00:00:00Z",
    "environment": "string",
    "error_info": {
      "exception_type": "string",
      "message": "string",
      "traceback": "string"
    },
    "input": {},
    "metadata": {},
    "name": "string",
    "output": {},
    "project_id": "00000000-0000-0000-0000-000000000000",
    "project_name": "string",
    "source": "evaluator",
    "tags": [
      "string"
    ],
    "tags_to_add": [
      "string"
    ],
    "tags_to_remove": [
      "string"
    ],
    "thread_id": "string",
    "ttft": 0
  }
}

Responses

204No Content
400Bad Requestapplication/json
objectErrorMessage
codeinteger · int32
detailsstring
messagestring
Example response
{
  "code": 0,
  "details": "string",
  "message": "string"
}
Documentation menu