granularity_too_fine
HTTP 422 Requested granularity produces too many buckets for this window
What happened
Your request would produce too many rows to return whole. On GET /v1/project/costs that means the window, split at the requested granularity, exceeds 750 buckets. On GET /v1/project/costs/servers it means granularity=daily or hourly over your window exceeds 5000 server-days or server-hours - there the limit counts actual rows, so it depends on how many servers the project ran, not on the window alone. On GET /v1/account/costs it means the buckets of all projects together exceed 5000. The response is not silently truncated, because a missing row reads as "no spend".
What to do
Narrow the window with start and end, or ask for a coarser granularity: hourly to daily, daily to none. On the per-server breakdown you can also ask for a single server with server_id.
Retrying
Fix the request and send it again.
How it arrives
{
"type": "https://docs.fiberax.com/errors/granularity_too_fine",
"title": "Requested granularity produces too many buckets for this window",
"status": 422,
"code": "granularity_too_fine",
"request_id": "a277dcd1ca652c65"
}
Branch your code on code, never on the wording of title.