Flags API reference

Flags API · Stats

get/v1/workspaces/{workspace_id}/statsAuth

Get 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 · uuid

Id of the workspace.

Response · 200 The stats.

projects*integer

Projects in the workspace.

Example: 1

configs*integer

Configs across all projects.

Example: 2

settings*integer

Feature flags and settings across all configs.

Example: 37

segments*integer

Segments across all projects.

Example: 4

changes_last_week*integer

Changes 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-time

When 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*array

History usage per project against the retention caps.

Example

Request

GET https://api.flags.productcraft.co/v1/workspaces/{workspace_id}/stats
Authorization: Bearer YOUR_TOKEN

Response

{
  "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
    }
  ]
}