export_bundle
const url = 'https://example.com/api/v1/config/bundle';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/config/bundle \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The deployment’s monitoring configuration as a portable bundle. Carries no secrets — credentials, channel configs and ingest tokens stay in this deployment
A whole configuration bundle.
object
A recurring Troubleshoot analysis.
object
A discovery classification rule.
object
One metric inside a collection template.
object
A reusable collection template.
object
A DNS monitor’s configuration (1:1 with its node).
object
A passive-event match rule.
object
A passive-event ingest source.
object
When the export ran.
Always yagra.config-bundle. An importer refuses anything else rather than guessing.
A forwarding destination. Its optional sealed secret is not carried; a destination that had one arrives disabled.
object
Whether the source deployment had a sealed secret on this destination. Carries no secret — it is what tells the importer to arrive disabled and what tells the operator to re-enter it.
A folder in the inventory tree.
object
Labels this folder supplies to everything beneath it (ADR-135 inc. 2). Absent in a bundle written by an older deployment.
Labels this folder refuses to inherit from its own ancestors.
A monitored node. credential_id is a reference only — see the module docs.
object
IPv4 or IPv6, as text.
The operator’s free-text note (ADR-135). Absent in a bundle written by an older deployment, which reads as “no note” rather than failing the import.
Whether a person fixed this node’s profile against reclassification (ADR-140). Carried because it is a decision, not an observation; absent in a bundle written by an older deployment, which reads as unlocked — the state every node starts in.
The node’s own labels.
🚨 Typed, not serde_json::Value, since ADR-135 — and the loose version was a live
hazard. nodes.tags is decoded into a fixed shape by repo::node_from_row, so a bundle
carrying any other JSON made that try_get fail — for every reader of that row, which is
the node list, the alert engine’s config rebuild and the scheduler’s sweep. This module’s
own test fixture wrote json!(["core"]), so the shape was not hypothetical.
🚨 Read leniently, and this is the ONE compatibility promise ADR-135 inc. 2 keeps.
Everything else about labels was free to change because no release ever carried one — but a
bundle is a file, and one written by v0.3.16 or earlier holds "tags": {} or a whole
key→value object. [de_labels] accepts both that and the list this version writes.
Labels this node refuses to inherit from its folder chain (ADR-135 inc. 2). Absent in a bundle written by an older deployment, which reads as “refuses nothing”.
What the export left out or changed. Informational; ignored on import.
One note, with the table it concerns and how many rows it covers.
object
What happened.
How many rows this note covers.
The column involved, when the note is about one (e.g. credential_id).
The table the note is about.
A profile↔template attachment.
object
A device profile.
object
A saved report template.
object
A recurring report run.
object
How secrets are represented. Always references — a bundle never carries one.
A threshold rule.
object
Which table rows the rule reaches, by name (I/O, MPU Board *). Absent means every row,
which is also what a bundle written before row patterns existed means.
The rule’s first target. Kept beside scope_ids so that a bundle written by a newer
deployment still imports into an older one.
Every target the rule applies to. Absent in a bundle written before rules could name more
than one, in which case scope_id is the whole answer.
The four bounds a rule can name (ADR-081). Absent in a bundle written before ranges existed,
in which case direction + warning + critical is the whole answer.
A URL / HTTP endpoint monitor’s configuration (1:1 with its node).
object
The monitor’s response-body keyword rule, if it has one.
How many bytes of the response body the monitor reads.
The monitor’s JSON extraction rules, if it has any.
Bundle schema version.
The Yagra version that produced it.
Example
{ "notes": [ { "code": "skipped_builtin" } ], "secrets": "references"}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 ManageSystem
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" }}A table holds more rows than one bundle carries; use a database dump for a deployment this size
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" }}