/v1/workspaces/{workspace_id}/statsAuthGet Flags stats
Counts for the workspace: projects, configs, flags and settings, segments, changes in the last 7 days and when the latest change was made, plus each project’s history usage against the retention caps (50,000 rows or 200 MiB per project; `warning` from 80%). Counts only: no keys, values or rules.
Path parameters
workspace_id*string · uuidId of the workspace.
Response · 200 The stats.
projects*integerProjects in the workspace.
Example: 1
configs*integerConfigs across all projects.
Example: 2
settings*integerFeature flags and settings across all configs.
Example: 37
segments*integerSegments across all projects.
Example: 4
changes_last_week*integerChanges made by people and API keys in the last 7 days (system housekeeping such as snapshot pruning is not counted).
Example: 12
last_change_at*string · date-timeWhen the latest change by a person or API key was made; null when there is none.
Example: "2026-11-10T09:30:00.000Z"
history_usage*arrayHistory usage per project against the retention caps.
Example
Request
GET https://api.flags.productcraft.co/v1/workspaces/{workspace_id}/stats
Authorization: Bearer YOUR_TOKENResponse
{
"projects": 1,
"configs": 2,
"settings": 37,
"segments": 4,
"changes_last_week": 12,
"last_change_at": "2026-11-10T09:30:00.000Z",
"history_usage": [
{
"project_id": "3f9a1c52-7b1e-4d4a-9f0e-2a6c8b1d5e70",
"name": "Storefront",
"rows": 1240,
"bytes": 524288,
"max_rows": 50000,
"max_bytes": 209715200,
"warning": false
}
]
}