Skip to content

switch_auto_save

POST
/api/v1/config-backups/auto-save
curl --request POST \
--url https://example.com/api/v1/config-backups/auto-save \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "enabled": true, "node_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'
Media typeapplication/json

Automatic save switched on or off for many nodes at once (Inc.11 decision 14).

object
enabled
required
boolean
node_ids
required
Array<string>
Examplegenerated
{
"enabled": true,
"node_ids": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}

Switched. A node switched on is saved in the same login right after a fetch finds its running configuration differs from its startup one, outside a maintenance window; a failed save is tried again after the next fetch. Only a node backed up now whose model has a save command is switched on; switching the backup off switches this off too

Media typeapplication/json

What an automatic-save switch did.

object
switched
required

Switched by this call.

Array<string>
unchanged
required

Named but already in that state.

integer
unsupported
required

Not switched on: the node is not backed up now, or its model has no save command.

Array<string>
Examplegenerated
{
"switched": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"unchanged": 1,
"unsupported": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}

No node, or more than 5,000 (invalid_auto_save)

Media typeapplication/json

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
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

No valid bearer token

Media typeapplication/json

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
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Role lacks SaveDeviceConfig, the caller is an API token (token_not_permitted), or the caller is restricted to folders (scope_unsupported)

Media typeapplication/json

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
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

This deployment has no write side (skeleton mode)

Media typeapplication/json

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
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}