Table of Contents

Class AuditController

Namespace
JD.AI.Gateway.Endpoints
Assembly
JD.AI.Gateway.dll

Exposes historical gateway events via REST for the Dashboard Logs page. Events are served from the in-memory event buffer maintained by InMemoryEventBus.

[ApiController]
[Route("api/audit")]
public sealed class AuditController : ControllerBase
Inheritance
AuditController
Inherited Members

Constructors

AuditController(IEventBus)

public AuditController(IEventBus eventBus)

Parameters

eventBus IEventBus

Methods

GetAuditEvents(int, CancellationToken)

Returns the most recent gateway events, newest first.

[HttpGet]
public Task<IReadOnlyList<AuditEventDto>> GetAuditEvents(int limit = 500, CancellationToken ct = default)

Parameters

limit int

Maximum number of events to return (default: 500, max: 2000).

ct CancellationToken

Returns

Task<IReadOnlyList<AuditEventDto>>