Get a function's traffic stats
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 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
Define the version of the Connect protocol
1Define the timeout, in ms
Request Body
application/json
^[A-Za-z0-9_-]+$1 <= length <= 64range_sec is how far back to read; 24 hours by default, 14 days at most.
int640 <= value <= 1209600step_sec is the rollup width. Raised to the five-minute storage resolution when finer, and coarsened so at most 500 points are returned.
int640 <= value <= 1209600Response 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]"
]
}