Skip to content

save_job

GET
/internal/oxidized/save
curl --request GET \
--url 'https://example.com/internal/oxidized/save?node=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--header 'Authorization: Bearer <token>'
node
required
string format: uuid

Oxidized’s name for the node: its id.

What to do for the node just fetched, with its login in plaintext and its model’s commands. For the save script inside the bundled oxidized alone: it demands the source token in x-yagra-oxidized-token

Media typeapplication/json

What the save script does for one node, with what it needs to do it.

object
action
required

save, auto (compare, and save when unsaved) or check.

string
commands
required

The model’s row of config_save::SAVE_COMMANDS, the only commands the script may send.

object
enable
string | null
group
required
string
input
required
string
ip
required
string
model
required
string
password
required
string
save

The save this run reports against; absent for a check.

string | null format: uuid
ssh_port
integer | null format: int32
telnet_port
integer | null format: int32
username
required
string
Examplegenerated
{
"action": "example",
"commands": {},
"enable": "example",
"group": "example",
"input": "example",
"ip": "example",
"model": "example",
"password": "example",
"save": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"ssh_port": 1,
"telnet_port": 1,
"username": "example"
}

Nothing to do for this node

No token, or the wrong one (oxidized_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"
}
}

This deployment has no config backup (config_backup_unavailable)

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"
}
}