Home > @opengovsg/logging > SensitiveEndpointAccessedInput
SensitiveEndpointAccessedInput interface
Input for ApiUsageAudit.sensitiveEndpointAccessed().
Signature:
typescript
export interface SensitiveEndpointAccessedInput extends AuditInputBaseExtends: AuditInputBase
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| endpoint | string | The endpoint accessed, e.g. /api/admin/export. | |
| keyId | string | The acting principal — the API key/credential id used to make the call, a reference and never the key value. Required so no API-usage line is anonymous; pair with userId when the key is user-bound. Emitted as context.key_id. | |
| method | string | The HTTP method. | |
| params? | AuditContext | (Optional) Request parameters — caller-sanitised; keep secrets/PII out. | |
| userId? | string | (Optional) The acting user, if the request was user-authenticated. Promoted to user_id. |