Skip to main content
PATCH
/
api
/
v2
/
experiments
/
{experiment_id}
/
logs
/
{log_id}
{
  "output": {
    "output": "This is the output of the custom workflow"
  }
}
{
  "id": "log_id_123",
  "input": {},
  "output": {
    "output": "This is the output of the custom workflow"
  }
}
Update a specific log in an experiment using the V2 API.

Authentication

  • API key: Authorization: Bearer <API key>

Path Parameters

experiment_id
string
required
The ID of the experiment.
log_id
string
required
The ID of the log to update.

Request Body

{
  "output": {
    "output": "This is the output of the custom workflow"
  }
}

Examples

import requests

experiment_id = "experiment_id_123"
log_id = "log_id_123"
url = f"https://api.keywordsai.co/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())

Response

{
  "id": "log_id_123",
  "input": {},
  "output": {
    "output": "This is the output of the custom workflow"
  }
}