Skip to Content
Xeonr Developer Docs
API SpecificationStats

Get a function's traffic stats

POST
/xeonr.functions.v2.StatsService/GetFunctionStats

Returns the function's edge traffic as a series of buckets, oldest first: requests, 4xx and 5xx responses, cold starts, and p50 and p95 latency. rangeSec defaults to 24 hours and is capped at 14 days. stepSec is raised to the five-minute storage resolution, and coarsened so that at most about 500 points come back. Buckets with no traffic are returned as zeros. The series is not paged: it is bounded by the point cap.

Needs the viewer role in the owning team. Callable with a console session or a team API key (Authorization: Bearer xk_…).

Required scopes: functions:functions:read

Authorization

BearerAuth
AuthorizationBearer <token>

A team API key, created by a team admin in the console and presented as Authorization: Bearer xk_…. Xeonr Auth issues and verifies it; the secret is shown once at creation and stored only as a hash, and a revoked key stops working within 30 seconds. An existing fnt_… token is accepted the same way.

In: header

Header Parameters

Connect-Protocol-Version*number

Define the version of the Connect protocol

Value in1
Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

functionId?string
Match^[A-Za-z0-9_-]+$
Length1 <= length <= 64
rangeSec?|

range_sec is how far back to read; 24 hours by default, 14 days at most.

Formatint64
Range0 <= value <= 1209600
stepSec?|

step_sec is the rollup width. Raised to the five-minute storage resolution when finer, and coarsened so at most 500 points are returned.

Formatint64
Range0 <= value <= 1209600
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://functions.xeonr.io/xeonr.functions.v2.StatsService/GetFunctionStats" \  -H "Connect-Protocol-Version: 1" \  -H "Content-Type: application/json" \  -d '{}'
{
  "series": [
    "map[coldStarts:3 errors4xx:12 errors5xx:1 p50Ms:42 p95Ms:180 requests:1204 start:2026-10-22T09:30:00Z]"
  ]
}