Search experiment spans
Search experiment spans using filters with the V2 API.
## Authentication
- API key: `Authorization: Bearer `
## Path Parameters
- `experiment_id` *string* **required**: The ID of the experiment to search spans for.
## Request Body
```json Request
{
"filters": {
"comparison_key": {
"operator": "in",
"value": ["b7c84ae535cf66aef2f862eb260a14bd1aa9310220076cf196fec40860ac0d11"]
}
}
}
```
## Examples
```python Python
experiment_id = "experiment_id_123"
url = f"https://api.respan.ai/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())
```
```bash cURL
curl -X POST "https://api.respan.ai/api/v2/experiments/{experiment_id}/logs/list" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"filters": {
"comparison_key": {
"operator": "in",
"value": ["key_123"]
}
}
}'
```
## Response
```json 200 OK
{
"count": 1,
"results": [
{
"id": "log_id_123",
"input": {},
"output": {},
"comparison_key": "b7c84ae535cf66aef2f862eb260a14bd1aa9310220076cf196fec40860ac0d11"
}
]
}
```
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 to search spans for.
Request
This endpoint expects an object.
Response
Successful response for Search experiment spans
Errors
401
Unauthorized Error