コンテンツにスキップ

put_remote

PUT
/api/v1/config-backup-remote
curl --request PUT \
--url https://example.com/api/v1/config-backup-remote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "auth": "https_token", "branch": "example", "token": "example", "url": "example", "username": "example" }'
Media typeapplication/json

The destination a person sets.

object
auth
required

How the destination is reached.

string
Allowed values: https_token ssh_key unknown
branch

The branch pushed to. Omitted: main.

string | null
token

The HTTPS access token. Omitted: keep the stored one, which is only kept for the same host and port.

string | null
url
required

https://host/owner/repo.git for a token, ssh://git@host/owner/repo.git or git@host:owner/repo.git for a key.

string
username

The HTTPS user name (x-token-auth for a Bitbucket repository token).

string | null

Set. With an SSH key, the response carries the public half to register as a deploy key

Media typeapplication/json

The destination, for the person who sets it.

object
auth
One of:
null
branch
string | null
configured
required
boolean
host_keys
required

The destination’s host keys learned on the first SSH push, as type SHA256:….

Array<string>
ssh_public_key

The public half of the SSH key, to register as a deploy key with write access.

string | null
status
required

How the last push went.

object
configured
required

A destination is set.

boolean
failed_at
string | null format: date-time
failure
One of:
null
failures
required

Failed pushes in a row.

integer format: int32
host

The host config backups go to — the URL’s host, not its path.

string | null
pushed_at

When a push last succeeded, and the commit the destination then held: the one a person finds there.

string | null format: date-time
pushed_commit
string | null
url
string | null
username

The HTTPS user name. The token is never returned.

string | null
Example
{
"auth": "https_token",
"status": {
"failure": "auth"
}
}

A URL, branch, user name or token that is refused (invalid_config_backup_remote), or a destination moved to another host with no token of its own (token_required_for_new_address)

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

The caller lacks manage-system

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 write side (skeleton mode)

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