Update experiment span
Update a specific log in an experiment using the V2 API.
## Authentication
- API key: `Authorization: Bearer `
## Path Parameters
- `experiment_id` *string* **required**: The ID of the experiment.
- `log_id` *string* **required**: The ID of the log to update.
## Request Body
```json Request
{
"output": {
"output": "This is the output of the custom workflow"
}
}
```
## Examples
```python Python
experiment_id = "experiment_id_123"
log_id = "log_id_123"
url = f"https://api.respan.ai/api/v2/experiments/{experiment_id}/logs/{log_id}"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"output": {
"output": "This is the output of the custom workflow"
}
}
response = requests.patch(url, headers=headers, json=data)
print(response.json())
```
```bash cURL
curl -X PATCH "https://api.respan.ai/api/v2/experiments/{experiment_id}/logs/{log_id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"output": {
"output": "This is the output of the custom workflow"
}
}'
```
## Response
```json 200 OK
{
"id": "log_id_123",
"input": {},
"output": {
"output": "This is the output of the custom workflow"
}
}
```
Authentication
AuthorizationBearer
API key authentication. Get your API key from https://platform.respan.ai/platform/api-keys
Path parameters
experiment_id
The ID of the experiment.
log_id
The ID of the log to update.
Request
This endpoint expects an object.
Response
Successful response for Update experiment span
Errors
401
Unauthorized Error