Skip to content

feat: Audit Inspector Minimal API endpoints (MapAuditInspector, read-only) #294

Description

@samtrion

User Story

As a compliance officer or developer, I want read-only minimal API endpoints for querying the audit trail, so that I can review command history by user, time range, or outcome without direct database access.


Requirements

  • Create AuditInspectorOptions: BasePath = "/pulse/audit", RouteGroupName = "Pulse Audit Inspector".
  • Create AuditInspectorEndpoints (static class, read-only — no replay or dismiss):
    • GET {base}/stats → IAuditManagement.GetStatisticsAsync()
    • GET {base}/entries?commandType=&userId=&from=&to=&result=&take=50&skip=0 → QueryAsync(filter)
    • GET {base}/entries/{id} → single record or 404
  • Add MapAuditInspector(this IEndpointRouteBuilder, Action? configure = null) returning IEndpointConventionBuilder.
  • No built-in authorization.

Acceptance Criteria

  • All three read-only endpoints respond correctly.
  • All filter query-string parameters bound correctly.
  • 404 when record not found.
  • Unit tests cover all three endpoints.

Dependencies

  • Requires feat: Define Audit Trail schema, interfaces, and options

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type:featureIndicates a new feature or enhancement to be added.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions