Skip to main content
Version: v0.1.0

Evidence API resources

Field-by-field reference for the v1alpha1 payloads. The transport, envelope, pagination, and error rules are in the evidence API reference.

The authoritative machine-readable definition is the generated api/evidence/v1alpha1/schema.json plus the Go types beside it and the wire goldens under testdata/wire. If this page and the schema ever disagree, the schema is right.

Two rules apply everywhere: a nullable field is present with a JSON null when it is unknown, never omitted and never zero; and omitting a field can never improve a state.

Capabilities

capabilities is a complete, unique, id-sorted array.

FieldTypeRule
idstring enumformat-neutral capability identifier
supportsupported, unsupported, unknownunsupported or unknown support requires state: unknown
statefour-state enumcurrent evidence for this capability
reasonReasonbounded typed explanation

The identifiers are exactly:

object-inventory, catalog-listing, structural-artifact-validation, dependency-chain-validation, wal-continuity, timeline-history-traversal, encrypted-metadata, observed-recovery-coverage, retention-expectation-comparison.

An unsupported, disabled, or failed capability stays visible and forces dependent conclusions to unknown. It never disappears from the payload and is never rendered as zero or healthy.

Inventory summary

FieldTypeRule
knownbooleanfalse after an incomplete first scan; retained stale evidence stays known and is governed by the top-level stale/state
object_countinteger or nullexact only when known
stored_bytesinteger or nullexact visible object bytes, only when known
unscoped_object_countinteger or nullexact only when known; sidecar prefix confinement should normally make this zero
pages_examinedintegerbounded attempt fact
objects_examinedintegerbounded attempt fact
last_failure_categorystring or nullstable redacted category only

Raw recent objects and custom object metadata are intentionally absent.

Typed details union

details is a closed, validated tagged union:

{
"type": "barman-cloud/v1alpha1",
"barman_cloud": {}
}

Exactly one payload matching type is allowed; map[string]any is forbidden. For an unrecognized type the types module keeps only the bounded tag, discards the payload, and marks format details unavailable/unknown while keeping a valid common envelope.

barman_cloud summary

FieldTypeRule
backup_itemsunsigned integer or nullexact number available through /backups
wal_range_itemsunsigned integer or nullexact number available through /wal-ranges
wal_gap_itemsunsigned integer or nullexact number available through /wal-gaps
recovery_path_itemsunsigned integer or nullexact number available through /recovery-paths
structurally_usable_backupsunsigned integer or nullbackups proven structurally usable by Barman rules
backup_statesStateCounts or nullall four state counts when known
wal_countsBarmanWALCounts or nullall supported WAL class counts when known
walStateReasonWAL continuity state
timelineStateReasontimeline-history state
coverageStateReasonobserved recovery-coverage state
retentionBarmanRetentionSummarydescriptive or expected retention result
latest_archive_receipt_attimestamp or nulllatest provider receipt/modification time, never transaction time
ranges_truncatedbooleana safety ceiling was reached building ranges
diagnostics_truncatedbooleana safety ceiling was reached retaining diagnostics

StateCounts has required unsigned integers healthy, warning, unhealthy, unknown. BarmanWALCounts has required unsigned integers segment, partial, history, backup_history, unknown, duplicate.

BarmanRetentionSummary has visible_backups and structurally_usable_backups (unsigned integer or null), oldest_completion_at and newest_completion_at (timestamp or null), minimum_configured and policy_configured (boolean), minimum_redundancy (unsigned integer or null, and null unless minimum_configured is true), plus required state and reason. A configured but unrecognized policy forces retention state to unknown.

Collection counts are null whenever the governing evidence is incomplete, and a truncation flag forces its dependent state to unknown.

Barman backup items

GET /api/v1alpha1/backupsBarmanBackupPage. Sorted by exact backup_id, then server. Backup IDs are case-sensitive opaque identifiers — do not parse timestamps out of them.

FieldTypeRule
serverstringexact configured Barman server
backup_idstringexact case-sensitive Barman backup ID, ≤ 256 bytes
statusstring or nullallowlisted format-native status, ≤ 64 bytes
backup_typestring or nullallowlisted format-native type, ≤ 64 bytes; an unknown type is null and forces state unknown
statefour-state enumstructural evidence for this backup
reasonReasonrequired typed reason
system_iddecimal string or nullPostgreSQL system identifier, never a JSON number
postgresql_versionunsigned integer or nullformat-declared version
timelineunsigned integer or nulltimeline ID; zero is invalid
wal_segment_size_bytesunsigned integer or nullformat-declared; no 16 MiB default
begin_wal / end_walstring or nullallowlisted WAL segment names, not object keys
begin_lsn / end_lsnstring or nullvalidated uppercase PostgreSQL LSN
begin_at / end_attimestamp or nullformat-declared begin and completion time
logical_bytesunsigned integer or nulllogical backup size
deduplicated_bytesunsigned integer or nullonly when explicitly declared by the format
stored_artifact_bytesunsigned integer or nullexact visible bytes of validated artifacts
compressionstring or nullallowlisted classification, not provider metadata
encryptionstring or nullallowlisted classification; unknown never becomes none
artifact_countunsigned integer or nullcount only — artifact keys are forbidden
tablespace_countunsigned integer or nullcount only — OIDs and paths are forbidden

An item's state is the last complete evidence for that backup. If the parent snapshot is stale or unknown, render the item as retained historical evidence, not as currently healthy.

WAL range items

GET /api/v1alpha1/wal-rangesBarmanWALRangePage. Sorted by server, timeline, then start position.

FieldTypeRule
serverstringexact configured Barman server
timelineunsigned integertimeline ID; zero is invalid
start_positionunsigned integerformat-derived segment position
end_positionunsigned integerinclusive position, not an LSN
segment_countunsigned integerexact count in the compact range
first_wal / last_walstringallowlisted WAL names
latest_receipt_attimestamp or nulllatest provider receipt/modification time in the range
end_receipt_attimestamp or nullreceipt/modification time of the ending segment

WAL gap items

GET /api/v1alpha1/wal-gapsBarmanWALGapPage. Sorted by server, timeline, then start position.

FieldTypeRule
serverstringexact configured Barman server
timelineunsigned integertimeline ID; zero is invalid
start_positionunsigned integerfirst missing position
end_positionunsigned integerlast missing position, inclusive
segment_countunsigned integerexact number of missing positions
first_wal / last_walstringfirst and last missing WAL name
statusstring enumexactly candidate or confirmed
first_observed_generationunsigned integercomplete generation that first observed the candidate
last_observed_generationunsigned integermost recent complete generation observing it

A confirmed gap must have passed the gap lifecycle; a failed or incomplete scan cannot advance either generation.

WAL names are format-native segment identifiers, never object keys. Provider receipt timestamps are never transaction timestamps or PITR endpoints. Diagnostics that contain object keys stay in the standalone viewer and are not part of this API version.

Recovery-path items

GET /api/v1alpha1/recovery-pathsBarmanRecoveryPathPage. Sorted by backup ID, then target timeline.

FieldTypeRule
serverstringexact configured Barman server
backup_idstringexact case-sensitive Barman backup ID
target_timelineunsigned integerrequested or derived target timeline
statefour-state enumconservative observed-coverage state
reasonReasonrequired typed reason
stopstring enumfrontier, candidate-limited, gap-limited, or unknown-limited
lower_bound_attimestamp or nullconservative lower bound, never an exact PITR endpoint
start_timelineunsigned integer or nullproven starting timeline
start_positionunsigned integer or nullproven starting segment position
start_walstring or nullproven starting WAL name
frontier_timelineunsigned integer or nulltimeline at the observed frontier
frontier_positionunsigned integer or nullposition at the observed frontier
frontier_walstring or nullWAL name at the observed frontier
frontier_receipt_attimestamp or nullprovider receipt/modification time, not transaction time
assumption_codesarray of string enumssorted, unique, ≤ 32 allowlisted codes of ≤ 64 bytes each

Timeline-history keys, content, and graph edges are not exported in v1alpha1. The summary still exposes timeline capability and state, and every stop caused by missing or invalid ancestry is preserved in the path.

The API and its consumers say "observed recovery coverage". They never return or render "exact PITR window", "restorable until", "restore guaranteed", or "restore verified".