Skip to content

Home > @opengovsg/logging > SensitiveEndpointAccessedInput

SensitiveEndpointAccessedInput interface ​

Input for ApiUsageAudit.sensitiveEndpointAccessed().

Signature:

typescript
export interface SensitiveEndpointAccessedInput extends AuditInputBase

Extends: AuditInputBase

Properties ​

PropertyModifiersTypeDescription
endpointstringThe endpoint accessed, e.g. /api/admin/export.
keyIdstringThe 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.
methodstringThe 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.