save_job
const url = 'https://example.com/internal/oxidized/save?node=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';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/internal/oxidized/save?node=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Oxidized’s name for the node: its id.
Responses
Section titled “Responses”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
What the save script does for one node, with what it needs to do it.
object
save, auto (compare, and save when unsaved) or check.
The model’s row of config_save::SAVE_COMMANDS, the only commands the script may send.
object
The save this run reports against; absent for a check.
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)
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" }}This deployment has no config backup (config_backup_unavailable)
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" }}