feat(api): add administrative audit events endpoint - #156
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The endpoint, authorization semantics, session-bound pagination, and privacy projection align with the stated requirements and are backed by targeted tests.
Pull request overview
Adds a new read-only administrative API endpoint for listing durable workspace audit events, using session-bound signed cursors to support tenant-scoped, newest-first keyset pagination while keeping internal identifiers out of the public response.
Changes:
- Introduces
GET /api/v1/audit-events/with administrative membership authorization and a session-bound signed cursor for pagination. - Adds the audit-events route to the v1 API URL configuration.
- Adds comprehensive API tests covering authorization, tenant isolation, pagination/cursor binding, and projection/privacy constraints.
File summaries
| File | Description |
|---|---|
| backend/api/audit_views.py | Implements the administrative audit-events list endpoint and session-bound signed cursor pagination. |
| backend/api/urls.py | Registers the audit-events/ route in the API v1 URL patterns. |
| backend/api/tests.py | Adds coverage for authz, isolation, pagination behavior, cursor binding/expiry, and response projection/privacy. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #155
Summary
Changes
backend/api/audit_views.pybackend/api/urls.pybackend/api/tests.pyTest plan
manage.py checkmanage.py makemigrations --check --dry-rungit diff --checkChecklist
type:featurelabelCo-Authored-Bytrailer