Apply a bundle. Existing rows with the same id are updated, new ones created; nothing is ever deleted, and there is no replace mode.
const url = 'https://example.com/api/v1/config/bundle';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"analysis_schedules":[{"at_hour":1,"at_minute":1,"day_of_month":1,"day_of_week":1,"enabled":true,"frequency":"example","id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","params":"example","scope_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","scope_kind":"example","scope_label":"example","tool":"example"}],"app_settings":{"default_poll_interval_secs":1,"meraki_polling_enabled":true},"classification_rules":[{"enabled":true,"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","model":"example","priority":1,"profile_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","sysdescr_regex":"example","sysobjectid_prefix":"example","vendor":"example"}],"collection_template_items":[{"collection":"example","enabled":true,"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","metric_kind":"example","metric_name":"example","oid":"example","template_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}],"collection_templates":[{"description":"example","id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","name":"example"}],"dns_checks":[{"max_depth":1,"name":"example","node_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","record_type":"example","resolver_ip":"example","resolver_port":1,"timeout_ms":1}],"event_rules":[{"clear_pattern":"example","enabled":true,"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","match_kind":"example","min_count":1,"name":"example","node_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","pattern":"example","severity":"example","source_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","source_kind":"example","ttl_secs":1,"window_secs":1}],"event_sources":[{"enabled":true,"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","kind":"example","name":"example","node_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}],"exported_at":"2026-04-15T12:00:00Z","format":"example","forward_destinations":[{"ca_cert":"example","dest_kind":"example","enabled":true,"filter":"example","had_secret":true,"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","name":"example","pool":"example","rate_limit_per_sec":1,"source_kind":"example","target":"example","verbatim":true}],"node_groups":[{"group_type":"example","id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","latitude":1,"longitude":1,"name":"example","parent_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","pool":"example","sort_order":1}],"nodes":[{"address":"example","credential_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","group_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","model":"example","name":"example","parent_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","pool":"example","profile_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","sort_order":1,"tags":"example","vendor":"example"}],"notes":[{"code":"skipped_builtin","count":1,"field":"example","table":"example"}],"profile_collection_templates":[{"profile_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","template_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}],"profiles":[{"category":"example","id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","name":"example","parent_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","poll_interval_secs":1,"vendor":"example"}],"report_definitions":[{"description":"example","id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","name":"example","spec":"example"}],"report_schedules":[{"at_hour":1,"at_minute":1,"day_of_month":1,"day_of_week":1,"definition_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","enabled":true,"frequency":"example","id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}],"secrets":"references","thresholds":[{"critical":1,"direction":"example","dwell_samples":1,"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","metric":"example","scope_id":"example","scope_level":"example","warning":1}],"url_checks":[{"body_match":"example","body_max_bytes":1,"credential_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","expected_status":"example","follow_redirects":true,"json_extract":"example","method":"example","node_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","timeout_ms":1,"url":"example","verify_tls":true}],"version":1,"yagra_version":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/config/bundle \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "analysis_schedules": [ { "at_hour": 1, "at_minute": 1, "day_of_month": 1, "day_of_week": 1, "enabled": true, "frequency": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "params": "example", "scope_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "scope_kind": "example", "scope_label": "example", "tool": "example" } ], "app_settings": { "default_poll_interval_secs": 1, "meraki_polling_enabled": true }, "classification_rules": [ { "enabled": true, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "model": "example", "priority": 1, "profile_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "sysdescr_regex": "example", "sysobjectid_prefix": "example", "vendor": "example" } ], "collection_template_items": [ { "collection": "example", "enabled": true, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metric_kind": "example", "metric_name": "example", "oid": "example", "template_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ], "collection_templates": [ { "description": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example" } ], "dns_checks": [ { "max_depth": 1, "name": "example", "node_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "record_type": "example", "resolver_ip": "example", "resolver_port": 1, "timeout_ms": 1 } ], "event_rules": [ { "clear_pattern": "example", "enabled": true, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "match_kind": "example", "min_count": 1, "name": "example", "node_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "pattern": "example", "severity": "example", "source_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "source_kind": "example", "ttl_secs": 1, "window_secs": 1 } ], "event_sources": [ { "enabled": true, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "kind": "example", "name": "example", "node_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ], "exported_at": "2026-04-15T12:00:00Z", "format": "example", "forward_destinations": [ { "ca_cert": "example", "dest_kind": "example", "enabled": true, "filter": "example", "had_secret": true, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "pool": "example", "rate_limit_per_sec": 1, "source_kind": "example", "target": "example", "verbatim": true } ], "node_groups": [ { "group_type": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "latitude": 1, "longitude": 1, "name": "example", "parent_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "pool": "example", "sort_order": 1 } ], "nodes": [ { "address": "example", "credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "group_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "model": "example", "name": "example", "parent_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "pool": "example", "profile_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "sort_order": 1, "tags": "example", "vendor": "example" } ], "notes": [ { "code": "skipped_builtin", "count": 1, "field": "example", "table": "example" } ], "profile_collection_templates": [ { "profile_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "template_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ], "profiles": [ { "category": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "parent_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "poll_interval_secs": 1, "vendor": "example" } ], "report_definitions": [ { "description": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "spec": "example" } ], "report_schedules": [ { "at_hour": 1, "at_minute": 1, "day_of_month": 1, "day_of_week": 1, "definition_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "enabled": true, "frequency": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ], "secrets": "references", "thresholds": [ { "critical": 1, "direction": "example", "dwell_samples": 1, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metric": "example", "scope_id": "example", "scope_level": "example", "warning": 1 } ], "url_checks": [ { "body_match": "example", "body_max_bytes": 1, "credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "expected_status": "example", "follow_redirects": true, "json_extract": "example", "method": "example", "node_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "timeout_ms": 1, "url": "example", "verify_tls": true } ], "version": 1, "yagra_version": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Run the whole import and roll it back, returning the report it would have produced.
Request Bodyrequired
Section titled “Request Bodyrequired”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
A monitored node. credential_id is a reference only — see the module docs.
object
IPv4 or IPv6, as text.
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
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.
Responses
Section titled “Responses”Import report: per-table counts plus what was skipped or changed and why. With dry_run nothing was committed
The outcome of an import.
object
True when nothing was committed: the whole import ran and was rolled back.
What was skipped or changed, and why.
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.
Per-table counts, in dependency order.
What the import did to one table.
object
Example
{ "notes": [ { "code": "skipped_builtin" } ]}Not a Yagra configuration bundle, or a schema version this build cannot read
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" }}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 ManageConfig
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" }}The uploaded bundle is larger than the accepted body 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" }}