Workspaces

Count the open bugs across a whole workspace, broken down by severity

Changed on

Bearer atc:read (or cookie session) — the response is a workspace-wide defect posture, the same class of workspace inventory the sibling Home reads (/recent-projects, /active-runs) are gated on. OPEN means UNRESOLVED: bugs.status in ('open', 'in_progress'), the two states before a fix exists; resolved and closed are excluded. The counted statuses are echoed back as open_statuses so the definition travels with the numbers. Bugs filed against an ARCHIVED module are excluded, the same rule the bug lists and the defect heatmap apply, so this figure never claims defects a caller cannot enumerate. open_count is the sum of by_severity by construction, never an independent count, so the total always reconciles with the breakdown. Runs entirely under the caller's own RLS, so a foreign, nonexistent, or lost-membership workspace id returns the SAME zeroed 200 a workspace with no open bugs does — never an existence echo. A read that FAILS answers 500, never zeroes.

get/api/v1/workspaces/{id}/open-bugs

Request

  • Base URL: http://localhost:3000
  • URL: http://localhost:3000/api/v1/workspaces/{id}/open-bugs
  • Auth: one of:
    • API key in cookie sb-fmbpikzpkafptqximhxn-auth-token
    • HTTP bearer

Path parameters

idstring uuid required

Response

The workspace's open-bug count and its severity breakdown (possibly all zero).

open_countinteger required

How many bugs are OPEN across the WHOLE workspace, where open means UNRESOLVED: bugs.status is one of the values in open_statuses (open or in_progress). Both are pre-resolution states — a defect somebody is actively fixing is still outstanding — so triaging a bug from open to in_progress deliberately does NOT decrease this number; only resolving or closing it does. resolved and closed are both excluded. Bugs whose own module is ARCHIVED are excluded too, matching every surface that lists bugs (GET /api/v1/bugs and the defect heatmap both drop them), so this total always reconciles with what a caller can actually enumerate. DERIVED as the sum of by_severity rather than counted separately, so the total and the breakdown can never contradict each other.

open_statusesstring[] required

The exact bugs.status values counted above, published so the rule is machine-readable rather than inferred. This is the same list the Home stat card renders from and the same one the supporting partial index is built on, so the three cannot drift apart.

Changes

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status