For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DiscordPlatform
DocumentationIntegrationsAPI referenceSDKsChangelog
DocumentationIntegrationsAPI referenceSDKsChangelog
  • API Reference
      • POSTCreate a dataset
      • POSTList datasets
      • GETRetrieve a dataset
      • PATCHUpdate a dataset
      • DELDelete a dataset
      • POSTCreate a dataset log
      • POSTList dataset logs
      • GETRetrieve a dataset log
      • PATCHUpdate a dataset log
      • DELDelete a dataset log
      • POSTBulk create dataset logs
      • POSTRun evaluators on a dataset
      • GETList dataset evaluation runs
      • PUTReplace a dataset log
      • POSTImport existing logs into a dataset
      • DELRemove logs from a dataset
      • GETGet dataset logs summary
      • POSTGet filtered dataset logs summary
  • Reference
    • Filters API Reference
LogoLogo
DiscordPlatform
API ReferenceDatasets

Replace a dataset log

PUT
https://api.respan.ai/api/datasets/:dataset_id/logs/:unique_id/
PUT
/api/datasets/:dataset_id/logs/:unique_id/
$curl -X PUT https://api.respan.ai/api/datasets/dataset_id/logs/unique_id/ \
> -H "Authorization: Bearer sk_live_xxxxx" \
> -H "Content-Type: application/json" \
> -d '{
> "output": {
> "response": "UPDATED: Go to Settings > Security > Change Password.",
> "confidence": 0.99,
> "updated": true
> }
>}'
1{
2 "id": "888d342383e844e185e9cd80b63e4eb1",
3 "unique_id": "888d342383e844e185e9cd80b63e4eb1",
4 "organization_id": "8264a3f4-40c7-476a-97d1-96908127ea21",
5 "environment": "prod",
6 "timestamp": "2025-10-06T02:17:58.639822Z",
7 "start_time": "2025-10-06T02:17:58.639822Z",
8 "prompt_tokens": 415,
9 "completion_tokens": 12,
10 "total_request_tokens": 427,
11 "cost": 0.0002285,
12 "model": "gpt-4o-mini",
13 "latency": 0.451,
14 "status_code": 200,
15 "status": "success",
16 "metadata": {
17 "provider": "azure_openai"
18 },
19 "prompt": "Full prompt text here...",
20 "completion": "Full completion text here...",
21 "messages": [
22 {
23 "role": "user",
24 "content": "Hello"
25 }
26 ],
27 "dataset_id": "6dee217e-18c6-468e-ab6d-7b97e2115752",
28 "scores": []
29}
Replace a dataset log with a new payload. Fields omitted from the body are removed.
Was this page helpful?
Previous

Import existing logs into a dataset

Next
Built with

Path parameters

dataset_idstringRequired

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

unique_idstringRequired
Unique log ID within the dataset.

Headers

AuthorizationstringRequired

Bearer token. Use Bearer YOUR_API_KEY.

Request

This endpoint expects an object.
inputanyOptional
outputanyOptional
expected_outputanyOptional
promptstringOptional
completionstringOptional
metadataobjectOptional

Response

Updated dataset log.
idstring
Log ID.
unique_idstring
Unique log ID.
organization_idstring
environmentstring
timestampdatetime
start_timedatetime
prompt_tokensinteger
completion_tokensinteger
total_request_tokensinteger
costdouble
modelstring
latencydouble
status_codeinteger
statusstring
metadataobject
promptstring
completionstring
messageslist of objects
inputany
outputany
expected_outputany
dataset_idstring
scoreslist of objects

Errors

401
Unauthorized Error