Bugs

List and filter defects for a project, with aggregates

Changed on

Bearer atc:read (or cookie session). Mirrors GET /api/v1/activity and GET /api/v1/tests/{id}/runs. bunkai_list_bugs is SECURITY INVOKER — it runs under the caller's own RLS, so a non-member project_id silently returns a 200 empty page rather than leaking existence. Module filter rolls up the full subtree (Decision 7); archived-module defects are hidden unconditionally (Decision 12); default sort is severity ascending then most-recent-first (Decision 5); pagination is the bugs-local 3-field keyset cursor (Decision 11).

get/api/v1/bugs

Request

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

Query parameters

project_idstring uuid required

The project to list defects for. A project the caller cannot see returns a 200 with an empty page (Decision 9) rather than a 403 or 404 — the same non-disclosure collapse GET /api/v1/activity uses for a foreign workspace_id.

module_idstring uuid

Scope the list to this module and its full nested subtree (matched by modules.path prefix, depth up to 6 — Decision 7). A module outside project_id is rejected as validation_failed (module_not_in_project), but ONLY once project_id itself is confirmed visible (Decision 10).

statusstring

Comma-separated list of statuses, OR-within-field (Decision 6), e.g. open,in_progress. Each value must be one of open | in_progress | resolved | closed — an unrecognized value (e.g. in-progress with a hyphen) is rejected as validation_failed.

severitystring

Comma-separated list of severities, OR-within-field (Decision 6), e.g. P1,P2. Combined with status, filters are AND-across-fields. Each value must be one of P1 | P2 | P3 | P4.

limitinteger

Page size, 1..50 (default 30). Out of range is rejected (422); the RPC additionally clamps for direct callers.

cursorstring

Opaque page token taken verbatim from the previous response's next_cursor. A malformed token returns 400 — it never silently falls back to the first page.

Response

One page of the filtered defect list, with aggregates over the full filtered set (possibly empty).

next_cursorstring nullable required

Opaque token for the next page, or null when this is the last page. base64url — echo it back verbatim as ?cursor=; never construct or parse one.

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