Skip to content

docs: document the DB sink + query API that already ship, add endpoints - #1

Merged
man4ish merged 1 commit into
mainfrom
docs/readme-sink-endpoints-sync
Aug 8, 2026
Merged

docs: document the DB sink + query API that already ship, add endpoints#1
man4ish merged 1 commit into
mainfrom
docs/readme-sink-endpoints-sync

Conversation

@man4ish

@man4ish man4ish commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Architecture diagram's "Future Sink Layer (DB / S3 / OpenSearch)" undersold reality: worker/main.py + consumers/sink.py already write into a MySQL-backed store, and GET /audit/events already queries it, platform-admin-gated.
  • New "API Endpoints" section — /health, /audit/test, /audit/events — none were documented despite the Authentication section already referencing "audit query/search endpoints."
  • Added the three DB/consumer env vars backing the sink layer.

Testing

Docs-only change, verified against api/routes_audit_events.py, audit/config.py, worker/main.py, and consumers/sink.py directly.

🤖 Generated with Claude Code

- Architecture diagram's "Future Sink Layer (DB / S3 / OpenSearch)"
  undersold reality: worker/main.py + consumers/sink.py already write
  into a MySQL-backed store (db/models.py, Alembic-migrated,
  AUDIT_DATABASE_URL), and GET /audit/events already queries it,
  platform-admin-gated. Updated the diagram and the Roadmap's
  "OpenSearch / PostgreSQL sink | Planned" line, which read as if no
  sink existed at all -- it's specifically additional backends beyond
  the MySQL one that are still open.

- New "API Endpoints" section: /health, /audit/test (no auth today),
  and /audit/events (platform_admin-gated, with its real query
  params) -- the "Running" section only showed a health-check curl
  example before, despite the Authentication section already
  referencing "audit query/search endpoints" that were never
  documented anywhere.

- Added the three DB/consumer env vars (AUDIT_DATABASE_URL,
  AUDIT_CONSUMER_GROUP, AUDIT_CONSUMER_NAME) that back the sink layer,
  missing from the Environment Variables table.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@man4ish
man4ish merged commit 937e91b into main Aug 8, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant