datasets

Replace a dataset log

Replace a dataset log with a new payload. Fields omitted from the body are removed.

put/api/datasets/{dataset_id}/logs/{unique_id}/

Path parameters

dataset_idstring required

Dataset ID. Use _saved_logs for the virtual saved-logs collection.

unique_idstring required

Unique log ID within the dataset.

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

{"stackTrail":"paths:/api/datasets/{dataset_id}/logs/{unique_id}/:put:requestBody:content:application/json:schema:properties:input","oasType":"schema","type":"unknown","description":"Any type"}
{"stackTrail":"paths:/api/datasets/{dataset_id}/logs/{unique_id}/:put:requestBody:content:application/json:schema:properties:output","oasType":"schema","type":"unknown","description":"Any type"}
{"stackTrail":"paths:/api/datasets/{dataset_id}/logs/{unique_id}/:put:requestBody:content:application/json:schema:properties:expected_output","oasType":"schema","type":"unknown","description":"Any type"}
promptstring
completionstring
metadataApiDatasetsDatasetIdLogsUniqueIdPutRequestBodyContentApplicationJsonSchemaMetadata
error_codestring
error_messagestring

Response

Updated dataset log.

idstring

Log ID.

unique_idstring

Unique log ID.

organization_idstring
environmentstring
timestampstring date-time
start_timestring date-time
prompt_tokensinteger
completion_tokensinteger
total_request_tokensinteger
costnumber double
modelstring
latencynumber double
status_codeinteger
statusstring
metadataApiDatasetsDatasetIdLogsUniqueIdPutResponsesContentApplicationJsonSchemaMetadata
promptstring
completionstring
messagesApiDatasetsDatasetIdLogsUniqueIdPutResponsesContentApplicationJsonSchemaMessagesItems[]
{"stackTrail":"components:schemas:Datasets_replaceDatasetLog_Response_200:properties:input","oasType":"schema","type":"unknown","description":"Any type"}
{"stackTrail":"components:schemas:Datasets_replaceDatasetLog_Response_200:properties:output","oasType":"schema","type":"unknown","description":"Any type"}
{"stackTrail":"components:schemas:Datasets_replaceDatasetLog_Response_200:properties:expected_output","oasType":"schema","type":"unknown","description":"Any type"}
dataset_idstring
scoresApiDatasetsDatasetIdLogsUniqueIdPutResponsesContentApplicationJsonSchemaScoresItems[]
error_codestring
error_messagestring

Changes