Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Query latency, errors, throughput, and spend

/api/v1/observability/analytics/queryPOST
Authorization
ApiKey *Bearer <token>
Workspace API key. Create a key with the scope named by the operation. API keys use separate sharer identities; replacement keys do not inherit sharing ownership.
Query Parameters
startTime?string
endTime?string
days?string
Request Bodyapplication/jsonrequired
query?string
Max length: 1024
groupBy?string
orderBy?"count" | "spend"
limit?integer
Min: 1Max: 100
source?"spans" | "metrics"
Response
200 · Results from retained records in the selected workspace
buckets?object[]
groups?object[]
400 · Invalid query, range or cursor
Invalid query, range or cursor
503 · Storage or a required archive projection is unavailable
Storage or a required archive projection is unavailable
Request example
curl -X POST "https://app.halfspan.com/api/v1/observability/analytics/query" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{ "query": "kind:llm status:error", "groupBy": "model" }'