v3

latestOpenAPI 3.1.02026-07-311,4541,5202.3 MB
experiments

Update Experiment Span

Update experiment trace with customer-provided data.

Customer uploads the same format they see in the list endpoint: { "id": "551ba4023fc646b4859993a31665bff2", "input": "[{"role": "system", "content": "you are a helpful...", "output": "{"message": "Workflow result...", "name": "updated_experiment_trace", ... any other fields they want to update }

PATCH workflow:

  1. Get trace_unique_id from URL (same as 'id' in list endpoint)
  2. Retrieve existing object using cached get_full_object_by_unique_id
  3. Update fields provided by customer
  4. Re-insert updated object
  5. Return updated trace in same format as GET endpoint

Response: Updated trace in same format as GET/list endpoints

patch/api/v2/experiments/{experiment_id}/logs/{log_id}/

Path parameters

experiment_idstring required
log_idstring required

Headers

Authorizationstring required

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.

Request body

idstring
trace_unique_idstring
root_span_unique_idstring
unique_organization_idstring
environmentstring
customer_identifierstring
start_timestring date-time
end_timestring date-time
durationnumber double
span_countinteger
llm_call_countinteger
total_costnumber double
total_prompt_tokensinteger
total_completion_tokensinteger
total_tokensinteger
error_countinteger
namestring
inputstring
outputstring
storage_object_keystring
comparison_keystring
statusstring
expected_outputstring
updated_storage_object_keystring
latencynumber double

Response

idstring required
trace_unique_idstring required
root_span_unique_idstring
unique_organization_idstring
environmentstring
customer_identifierstring
start_timestring date-time
end_timestring date-time
durationnumber double
span_countinteger
llm_call_countinteger
total_costnumber double
total_prompt_tokensinteger
total_completion_tokensinteger
total_tokensinteger
error_countinteger
namestring
inputstring
outputstring
storage_object_keystring
comparison_keystring
statusstring
expected_outputstring
updated_storage_object_keystring
latencynumber double
scoresstring required
span_treestring required