Authentication
- API key:
Authorization: Bearer <API key>
Path Parameters
The ID of the experiment to search logs for.
{
"filters": {
"comparison_key": {
"operator": "in",
"value": ["b7c84ae535cf66aef2f862eb260a14bd1aa9310220076cf196fec40860ac0d11"]
}
}
}
{
"count": 1,
"results": [
{
"id": "log_id_123",
"input": {},
"output": {},
"comparison_key": "b7c84ae535cf66aef2f862eb260a14bd1aa9310220076cf196fec40860ac0d11"
}
]
}
Authorization: Bearer <API key>{
"filters": {
"comparison_key": {
"operator": "in",
"value": ["b7c84ae535cf66aef2f862eb260a14bd1aa9310220076cf196fec40860ac0d11"]
}
}
}
import requests
experiment_id = "experiment_id_123"
url = f"https://api.keywordsai.co/api/v2/experiments/{experiment_id}/logs/list"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"filters": {
"comparison_key": {
"operator": "in",
"value": ["b7c84ae535cf66aef2f862eb260a14bd1aa9310220076cf196fec40860ac0d11"]
}
}
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
{
"count": 1,
"results": [
{
"id": "log_id_123",
"input": {},
"output": {},
"comparison_key": "b7c84ae535cf66aef2f862eb260a14bd1aa9310220076cf196fec40860ac0d11"
}
]
}
Was this page helpful?
{
"filters": {
"comparison_key": {
"operator": "in",
"value": ["b7c84ae535cf66aef2f862eb260a14bd1aa9310220076cf196fec40860ac0d11"]
}
}
}
{
"count": 1,
"results": [
{
"id": "log_id_123",
"input": {},
"output": {},
"comparison_key": "b7c84ae535cf66aef2f862eb260a14bd1aa9310220076cf196fec40860ac0d11"
}
]
}