Skip to navigation

Get Stats

Delivery counters bucketed over time, plus the totals for the window. The series is gap-filled: every bucket in the requested window is present, and an empty one is zeros, so a chart needs no gap-filling of its own.

Counters are raw — derive rates yourself. Ask for compare=previous to get the same totals for the window immediately before this one.

Authentication

AuthorizationBearer

A workspace key (rray_live_…, bound to one workspace) or the account’s platform key. Platform keys name the target workspace with RRay-Workspace-Id. See Credentials.

Headers

RRay-Workspace-Idstring or nullOptional

The workspace to act on. Required with a platform key; rejected with a workspace key, which already carries its workspace — a matching value is rejected too, rather than silently ignored. An id that is not yours returns 404 workspace.not_found.

RRay-Workspace-Idslist of stringsOptional

Aggregate over several workspaces: 1 to 50 comma-separated workspace ids, each one yours. Platform keys only — rejected with a workspace key, which only ever reports its own workspace. Mutually exclusive with RRay-Workspace-Id; sending both is always 400 validation.workspace_header_conflict. An id that is not yours fails the whole request with 404 workspace.not_found rather than being skipped.

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
Bucket size the series was built with.
Allowed values:
serieslist of objects

One bucket per period in the window, oldest first and gap-filled — an empty period is present with zeros.

totalsobject
Sum of every counter over the whole 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"OptionalDefaults to stats

Always stats.

previous_totalsobject or nullOptional

Totals for the window immediately before this one. Present only when you asked for compare=previous, and null there when the earlier window starts before the retained history (unknown, not zero).

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