v3

latestOpenAPI 3.1.02026-07-311,4541,5202.3 MB
datasets

Api Datasets Logs Summary Retrieve

Get summary statistics for dataset logs including score summaries

Endpoint: GET /api/datasets/{dataset_id}/logs/summary/ POST /api/datasets/{dataset_id}/logs/summary/ (for filtering)

Args (POST body, optional): - filters (object, optional): Filter criteria to aggregate subset of logs

Returns (200 OK): json { "number_of_requests": 150, "total_cost": 12.45, "total_tokens": 50000, "total_prompt_tokens": 30000, "total_completion_tokens": 20000, "avg_latency": 1.23, "avg_tps": 45.2, "avg_ttft": 0.8, "scores": { "<evaluator_id>": { "evaluator_id": "<uuid>", "evaluator_slug": "quality_check", "evaluator_name": "Quality Check", "score_value_type": "numerical", "avg_score": 4.5, "true_count": null, "false_count": null } } }

Smart Syncing: When no filters are provided (or filters are empty), the endpoint will: 1. Count all logs in the dataset 2. Update dataset.log_count with the accurate count 3. Return the count

This ensures the dataset log_count stays accurate without requiring
separate sync operations.

Examples: Get total count (syncs to dataset): GET /api/datasets/{id}/logs/summary/ POST /api/datasets/{id}/logs/summary/ POST /api/datasets/{id}/logs/summary/ with {"filters": {}}

Get filtered count (no sync):
```
POST /api/datasets/{id}/logs/summary/
Body: {"filters": {"status_code": {"operator": "eq", "value": 200}}}
```

Note: Score summaries only include evaluators with score_value_type of 'numerical', 'percentage', or 'boolean'.

get/api/datasets/{dataset_id}/logs/summary/

Path parameters

dataset_idstring required

Headers

Authorizationstring required

JWT access token or Respan API key

Response

number_of_requestsinteger required
total_costnumber double required
total_tokensinteger required
total_prompt_tokensinteger required
total_completion_tokensinteger required
avg_latencynumber double required
avg_tpsnumber double required
avg_ttftnumber double required
has_outputboolean required
scoresobject required