Get Stats

Authentication

AuthorizationBearer
Your RRay API key.

Headers

RRay-Workspace-Idstring or nullOptional

The workspace to act on. Required when your credential is account-level; rejected (not silently ignored) for workspace-scoped API keys, which already carry their workspace and accept no header at all.

RRay-Workspace-Idslist of stringsOptional

Workspace ids (1-50) to aggregate over — platform credential only. Mutually exclusive with RRay-Workspace-Id; sending both is always an error.

Query parameters

group_byenumOptional

Bucket size: day, week (ISO-8601, Monday-start), or month (calendar).

Allowed values:
lastinteger or nullOptional>=1

Number of buckets to return, including the current (partial) one. Defaults to 1: the current (partial) bucket only. Hard ceilings depend on group_by: day 90, week 52, month 24.

compareenum or nullOptional
Opt-in comparison window. `previous`: the `last` buckets immediately preceding the primary window, same alignment rules. Adds `previous_totals` to the response — omitted entirely when `compare` is not set, an object of honest zeros when the prior window had no traffic, or `null` when the prior window starts before the retention horizon (unknown, not zero).
Allowed values:

Response

Successful Response
group_byenum

Stats bucket size (GET /v1/stats, query param group_by): day, ISO-8601 week (Monday-start), or calendar month. Exactly one TIME dimension — entity dimensions (e.g. per-workspace breakdown) are a separate, not-yet-supported axis; the name leaves room for those without implying they exist today.

serieslist of objects
totalsobject

Sum of every StatsSeriesBucket field over the requested window.

computed_atdatetime

When these numbers were computed — realtime today (the request time); will become the last rollup-refresh time if/when a rollup table replaces the on-the-fly aggregation, without changing this field’s meaning.

object"stats"Defaults to stats
previous_totalsobject or null

Sum of every StatsSeriesBucket field over the requested window.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error