push_report
const url = 'https://example.com/internal/oxidized/push';const options = { method: 'POST', headers: { Authorization: 'Bearer <token>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({ commit: 'example', failure: 'example', generation: '1', head: 'example', known_hosts: 'example', layout: 'example' })};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/internal/oxidized/push \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data commit=example \ --data failure=example \ --data generation=1 \ --data head=example \ --data known_hosts=example \ --data layout=exampleAuthorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”How one push went, as the push script reports it.
object
The commit pushed; required when the push succeeded.
Empty when the push succeeded; otherwise the failure core’s patterns named.
The host keys the first SSH push met, in known_hosts form.
The job’s layout, echoed.
Examplegenerated
commit=example&failure=example&generation=1&head=example&known_hosts=example&layout=exampleResponses
Section titled “Responses”Recorded, or ignored when the destination changed since the push was asked for. For the bundled oxidized alone: it demands the source token in x-yagra-oxidized-token
Not a version id (invalid_oid), or a success with no layout digest (invalid_layout)
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" }}