Update span (partial)
## Authentication
- API key: `Authorization: Bearer `
Request body:
```json
{
"metadata": {
"user_id": "user456",
"rating": 5
}
}
```
Request example:
```bash
curl -X PATCH "https://api.respan.ai/api/datasets/{dataset_id}/logs/{log_id}/" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"user_id": "user456",
"rating": 5
}
}'
```
Response (200 OK):
```json
{
"id": "log_12345",
"dataset_id": "dataset_67890",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
},
{
"role": "assistant",
"content": "The capital of France is Paris."
}
],
"model": "gpt-4",
"parameters": {
"temperature": 0.7,
"max_tokens": 150
},
"metadata": {
"user_id": "user456",
"session_id": "session456",
"rating": 5
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T11:45:00Z"
}
```
Errors:
- 401 Unauthorized — Missing/invalid authentication
- 404 Not Found — Dataset or log not found
- 400 Bad Request — Invalid request body
Authentication
AuthorizationBearer
API key authentication. Get your API key from https://platform.respan.ai/platform/api-keys
Path parameters
dataset_id
Dataset Id
log_id
Log Id
Request
This endpoint expects an object.
Response
Successful response for Update span (partial)
metadata
Errors
401
Unauthorized Error