API v1: public read-only search and watch-safe aggregate stats #109
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/starintel-server#109
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent work
Part of #58 (versioned/capability-discovered HTTP API), #46 (observability), and #62 (auth + integration hardening). This is one coherent RAGE implementation unit for the API overhaul.
Goal
Expose a deliberately public, read-only API surface suitable for third-party clients and small devices such as watches, without weakening the authenticated mutation/control plane.
Required authority split
Public / no bearer credential required
GET /api/v1/searchGET /api/v1/statsAuthenticated + authorized only
Legacy authenticated
/searchremains intact during migration. Do not make the legacy route an authorization bypass.Public search contract
tenantordatasetquery parametersStats contract
GET /api/v1/statsis deliberately small, aggregate-only, and safe to poll from a watch.Initial response should include at least:
Constraints:
Capability discovery
Extend
/api/v1/capabilitiesso endpoint entries describe their authority (public,authenticated, or privileged scope requirements) and advertise the versioned public search/stats surface without misrepresenting legacy routes.TDD / RAGE acceptance gates
Tests first. At minimum prove:
GET /api/v1/search?q=...reaches the public route instead of returning 401;GET /api/v1/statssucceeds and contains only the stable aggregate schema;targets:dispatch,documents:write, ordocuments:bulkas appropriate;/api/v1/capabilities, OpenAPI, and client manifest agree on public vs authenticated authority;Do not weaken or skip a failing gate. Merge only an exact-head green candidate.