Table of Contents

Class GovernanceEvidenceController

Namespace
ReferenceApplication.Web.Controllers.Api
Assembly
ReferenceApplication.Web.dll

Exposes minimized governance evidence for operational inspection.

[ApiController]
[ApiVersion("1.0")]
[Authorize(Policy = "application.Role.Administrator")]
[Route("api/v{version:apiVersion}/governance-evidence")]
public sealed class GovernanceEvidenceController : ControllerBase
Inheritance
GovernanceEvidenceController
Inherited Members

Constructors

GovernanceEvidenceController(IGovernanceEvidenceQuery, IGovernanceEvidenceVerifier, IGovernanceEvidenceNotifier, TimeProvider)

Exposes minimized governance evidence for operational inspection.

public GovernanceEvidenceController(IGovernanceEvidenceQuery evidenceQuery, IGovernanceEvidenceVerifier evidenceVerifier, IGovernanceEvidenceNotifier evidenceNotifier, TimeProvider timeProvider)

Parameters

evidenceQuery IGovernanceEvidenceQuery
evidenceVerifier IGovernanceEvidenceVerifier
evidenceNotifier IGovernanceEvidenceNotifier
timeProvider TimeProvider

Fields

HeartbeatInterval

The interval between SSE comment heartbeats on an otherwise idle notification stream.

public static readonly TimeSpan HeartbeatInterval

Field Value

TimeSpan

Remarks

Proxies and load balancers commonly close responses that send nothing for 60 seconds or more. A comment line keeps the connection observably alive without producing an event for the client.

Methods

Get(string, CancellationToken)

Gets the ordered, minimized evidence timeline for a governed request.

[HttpGet("{correlationId}")]
[ProducesResponseType<GovernanceEvidenceTimelineResponse>(200)]
[ProducesResponseType(401)]
[ProducesResponseType(403)]
[ProducesResponseType(404)]
public Task<ActionResult<GovernanceEvidenceTimelineResponse>> Get(string correlationId, CancellationToken cancellationToken)

Parameters

correlationId string

The exact correlation identifier recorded for the request.

cancellationToken CancellationToken

A token that cancels the query.

Returns

Task<ActionResult<GovernanceEvidenceTimelineResponse>>

The evidence timeline, or not found when the correlation identifier is unknown.

StreamNotifications(string?, CancellationToken)

Streams identifier-only hints whenever persisted governance evidence changes.

[HttpGet("notifications")]
[Produces("text/event-stream", new string[] { })]
[ProducesResponseType(200)]
[ProducesResponseType(401)]
[ProducesResponseType(403)]
public Task StreamNotifications(string? correlationId, CancellationToken cancellationToken)

Parameters

correlationId string

An optional exact correlation identifier to filter. Omit it to observe all evidence.

cancellationToken CancellationToken

The request-aborted token that ends the subscription.

Returns

Task

Remarks

This administrator-only endpoint deliberately sends no evidence payload. Clients re-query the evidence API by correlation identifier so the displayed timeline always comes from persisted state. A : keep-alive comment is written every HeartbeatInterval so intermediaries do not close an idle stream.

Verify(string, CancellationToken)

Recomputes the canonical hash of each decision ledger record for a governed request.

[HttpGet("{correlationId}/verification")]
[ProducesResponseType<GovernanceEvidenceVerificationResponse>(200)]
[ProducesResponseType(401)]
[ProducesResponseType(403)]
[ProducesResponseType(404)]
public Task<ActionResult<GovernanceEvidenceVerificationResponse>> Verify(string correlationId, CancellationToken cancellationToken)

Parameters

correlationId string

The exact correlation identifier recorded for the request.

cancellationToken CancellationToken

A token that cancels the verification.

Returns

Task<ActionResult<GovernanceEvidenceVerificationResponse>>

The record-level verification results, or not found when the correlation identifier is unknown.