Skip to main content
Veyndi AML
Documentation contents

API reference

Audit

6 operations in this area of the contract. Every one declares the permission it requires.

Contract version 0.3.0All areas

Operations

GET/v1/audit/chain-integrity

Verify this tenant's audit chain

Required permission: audit.chain.verifyverifyAuditChain

Recomputes the chain from genesis and checks every anchor, on demand. It does not read a stored verdict: a cached "valid" flag is precisely what an attacker would set. `broken_at_seq` locates the first divergence so an investigator has somewhere to start.

Show parameters and responses

Responses

  • 200Chain statusChainStatus
GET/v1/audit/events

The audit trail

Required permission: audit.event.readlistAuditEvents

Orders by immutable tenant sequence, newest first by default. Changing the sort, institution or filters requires a new cursor walk. Previously issued unbound cursors are refused; the explicit after_seq boundary remains supported in either direction.

Show parameters and responses

Parameters

NameInTypeDescription
actionquerystring—
resource_typequerystring—
resource_idquerystring—
sortqueryseq_desc | seq_asc | seqseq is a retained alias for descending sequence order.
after_seqqueryintegerKeyset position on the per-tenant sequence, in the clear. Predates `cursor` and still works; `cursor` wins if both are sent.
limitqueryintegerPage size, capped at 200.
cursorquerystringOpaque keyset cursor from a previous response. Offset pagination is deliberately not offered: `OFFSET 500000` is a table scan, and if it were offered it would be used (ADR-0012). Only the collections that document this parameter can be resumed. The rest report `truncated: true` and refuse a cursor rather than silently returning the first page again — see the `truncated` field on the page schemas.

Responses

  • 200A page of audit events in the selected immutable sequence orderAuditPage
  • 400—
  • 403—
GET/v1/audit/events/export

Export the complete filtered audit metadata index as CSV or Excel

Required permission: audit.event.readexportAuditRegister

Walks the authorized audit register in one repeatable-read transaction. Excludes actor labels, actor identifiers, resource identifiers, IPs, request identifiers, before/after state and metadata. Retains event identity, immutable sequence, disposition and chain digests. This metadata index cannot recompute full event digests without the omitted content; use the independent chain-verification tools. Up to 10,000 rows and 32 MiB are supported. Larger exports fail without a partial artifact. The artifact digest and row count are audited before bytes are returned. Cursor and after_seq positions are refused: exports start at the first matching row.

Show parameters and responses

Parameters

NameInTypeDescription
formatrequiredquerycsv | xlsx—
actionquerystring—
resource_typequerystring—
resource_idquerystring—
sortqueryseq_desc | seq_asc | seq—

Responses

  • 200Complete filtered metadata index with an audited digest
  • 400—
  • 401—
  • 403—
  • default—
GET/v1/audit/retention-policies

List retention coverage and effective hold state

Required permission: audit.retention.readlistRetentionPolicies

Returns every member of the closed evidence-family vocabulary, including families for which this tenant has no configured policy. Missing coverage is explicit and is never treated as an implicit five-year policy.

A hold is a conservative tenant-wide summary for subject-scoped evidence. An active or release-pending hold blocks reductions but permits increases; it does not claim every row belongs to the held subject. NEEDS-COMPLIANCE-VALIDATION (Q5). This surface does not purge data, choose an erasure boundary, or override a legal hold.

Show parameters and responses

Responses

  • 200Complete retention-policy coverageRetentionPolicyPage
GET/v1/audit/retention-policies/{resourceType}/history

List immutable applied versions for an evidence family

Required permission: audit.retention.readlistRetentionPolicyHistory
Show parameters and responses

Parameters

NameInTypeDescription
resourceTyperequiredpathalert_records | audit_events | case_records | configuration_history | customer_records | onboarding_evidence | privacy_records | regulatory_reports | screening_records | transaction_records—

Responses

  • 200Applied policy versions, newest firstRetentionHistoryPage
  • 422—
POST/v1/audit/retention-policies/{resourceType}/proposals

Propose a retention-period change for independent approval

Required permission: audit.retention.proposeproposeRetentionPolicy

Creates a digest-bound approval request; it does not change the effective policy. The maker cannot approve their own request. The five-year floor is validated before storage and enforced again by the database. An active hold refuses a reduction both here and when the checker later applies it, closing the approval-delay race. No deletion is performed.

Show parameters and responses

Parameters

NameInTypeDescription
resourceTyperequiredpathalert_records | audit_events | case_records | configuration_history | customer_records | onboarding_evidence | privacy_records | regulatory_reports | screening_records | transaction_records—

Responses

  • 202Proposal recorded; policy unchanged pending a different checkerRetentionProposal
  • 409An active or release-pending hold blocks this reduction
  • 422—