push_ask
const url = 'https://example.com/internal/oxidized/push?head=example';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/push?head=example' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The head of oxidized’s repository.
Responses
Section titled “Responses”Push this head: the destination with its token or private key in plaintext. For the bundled oxidized alone: it demands the source token in x-yagra-oxidized-token
One push, for the push script: where, as what, and the patterns its output is read by.
object
How the destination is reached.
[node id, path] pairs: the file each node’s configuration is pushed as (stage 4 decision
38). A node oxidized has a file for and this does not name is pushed as
deleted/<id>.txt.
The folder files are placed under at the destination. Everything outside it is left as the
destination holds it (stage 9 decision 75).
Echoed in the report, so a push made for a destination that has since changed is ignored.
The pinned host keys in known_hosts form; empty before the first SSH push.
The digest of files, echoed in the report.
[failure, lower-case text] pairs, matched in order against git’s lower-cased output.
The SSH private key, in plaintext, for this push alone.
The HTTPS token, in plaintext, for this push alone.
Example
{ "auth": "https_token"}Nothing to push: no destination, the head is already there, a recent push failed, the destination was set up by a newer core in a way this one does not know, or its credential cannot be opened
Not a version id (invalid_oid)
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 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" }}