/v1/workspaces/{workspace_id}/statsAuthWorkspace stats
Member count, active platform API keys, admin changes in the window with a daily series, the last admin change and the last API-key use, for the console dashboard. Admin changes are workspace audit events that record a mutation. Reads (any action ending `.read`), sign-ins (`auth.signin.succeeded`) and MCP tool-call rows (`workspace.mcp_tool.*`) are not counted, so opening the console does not move the numbers. Days are UTC. Counts and timestamps only: no actor identifiers. Cached for up to 60 seconds (`generated_at`).
Path parameters
workspace_id*string · uuidWorkspace id.
Query parameters
windowenum (3)Window for `in_window` and the length of `series`, in UTC days ending today.
Response · 200 Workspace stats.
window*objectWindow the counts cover.
Example: "30d"
generated_at*string · date-timeWhen these numbers were computed. Responses are cached for up to 60 seconds.
Example: "2026-10-07T09:00:00.000Z"
last_activity_at*string · date-timeMost recent admin change (same definition as `in_window.audit_events`: reads, sign-ins and MCP tool-call rows excluded), any time. Null when none.
Example: "2026-10-07T08:41:12.000Z"
totals*objectCurrent counts.
in_window*objectCounts for the window.
series*objectDaily admin changes.
Example
Request
GET https://api.platform-auth.productcraft.co/v1/workspaces/{workspace_id}/stats
Authorization: Bearer YOUR_TOKENResponse
{
"window": "30d",
"generated_at": "2026-10-07T09:00:00.000Z",
"last_activity_at": "2026-10-07T08:41:12.000Z",
"totals": {},
"in_window": {},
"series": {}
}