get_retention
const url = 'https://example.com/api/v1/settings/retention';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/settings/retention \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The deployment’s retention policy: editable windows plus the full table, including rows set by a store’s own start flag
The full retention policy: the editable windows plus every row of the table.
object
Every retained subject, including the ones no API can change.
One line of the retention table.
object
How the window is applied: pg_prune, store_ttl, store_flag or unlimited.
Which field of settings this row binds to, or store_owned / unlimited.
Operator-facing explanation. For a read-only row it names the flag that does change it.
The store that holds it.
Whether the backing store is configured in this deployment. A row for an unconfigured optional store retains nothing.
What the store itself reports for a store_flag row, verbatim (e.g. 12, 30d). Absent
when the store is unreachable or is running its own default — in which case the value is
genuinely unknown and is not guessed.
Stable identifier for the retained data, e.g. alert_history.
Where it can be changed: settings (here), store_flag_read_only (the store’s own
command-line flag), or by_decision (not retained on a schedule at all).
Unit of value: days, hours, or empty when the row has no configurable number.
The configured window, for rows this deployment controls.
The windows this endpoint can change.
object
Days to keep alert history, node-state snapshots, DNS chain changes and matched events.
Days to keep on-demand diagnostics: Troubleshoot analysis runs with their findings, and generated AI root-cause reports. Optional — omitting it sets the default (90).
Days to keep traffic-flow records, applied as a ClickHouse table TTL.
Days to keep generated report runs.
Hours to keep passive events that matched no rule.
Examplegenerated
{ "rows": [ { "enforcement": "example", "field": "example", "note": "example", "store": "example", "store_configured": true, "store_reported": "example", "subject": "example", "tunable": "example", "unit": "example", "value": 1 } ], "settings": { "alert_linked_days": 1, "diagnostic_days": 1, "flow_days": 1, "report_run_days": 1, "unmatched_event_hours": 1 }}No valid bearer token
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Role lacks View
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Inventory storage is unavailable (skeleton mode)
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}