Skip to content

push_ask

GET
/internal/oxidized/push
curl --request GET \
--url 'https://example.com/internal/oxidized/push?head=example' \
--header 'Authorization: Bearer <token>'
head
required
string

The head of oxidized’s repository.

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

Media typeapplication/json

One push, for the push script: where, as what, and the patterns its output is read by.

object
auth
required

How the destination is reached.

string
Allowed values: https_token ssh_key unknown
branch
required
string
files
required

[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.

Array<Array<string>>
folder
required

The folder files are placed under at the destination. Everything outside it is left as the destination holds it (stage 9 decision 75).

string
generation
required

Echoed in the report, so a push made for a destination that has since changed is ignored.

integer format: int64
known_hosts
required

The pinned host keys in known_hosts form; empty before the first SSH push.

string
layout
required

The digest of files, echoed in the report.

string
patterns
required

[failure, lower-case text] pairs, matched in order against git’s lower-cased output.

Array<Array<string>>
private_key

The SSH private key, in plaintext, for this push alone.

string | null
token

The HTTPS token, in plaintext, for this push alone.

string | null
url
required
string
username
string | null
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)

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