コンテンツにスキップ

Move this deployment to a different release.

POST
/api/v1/system/upgrade
curl --request POST \
--url https://example.com/api/v1/system/upgrade \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "include_core": true, "pollers": [ "example" ], "target_tag": "example" }'

Hands the request to the privileged updater container and returns immediately — the work outlives this process, which restarts partway through. Poll GET for the outcome.

Media typeapplication/json

A request to move this deployment to a particular release.

object
include_core

Whether to replace core, the WebUI and the co-located poller — everything in core’s own compose project. Defaults to true, which is what a request that omits it has always meant, so an older client and the MCP surface keep working unchanged.

false moves only the pollers named below, and then target_tag must be the version this core is already running: N/N-1 promises new-core-with-old-poller and says nothing about the reverse (ADR-009), so a poller may not be sent to a release core has not reached.

boolean
pollers

Which remote-site pollers to move. Absent means every poller that can move, which is what this route did before the field existed; an empty array means none.

That distinction is the reason this is nullable rather than a plain list: [] and “not specified” have to be different answers, or unchecking every row would silently upgrade the whole fleet.

Ids that name nothing are ignored. Core is not addressable here — it is moved by include_core, so naming it in this list does nothing.

Array<string> | null
target_tag
required

The release tag to move to, e.g. v0.2.2. Must be a published release tag; the repository it is fetched from is fixed by the deployment and cannot be set here.

string
Examplegenerated
{
"include_core": true,
"pollers": [
"example"
],
"target_tag": "example"
}

Accepted; the updater will carry it out

Media typeapplication/json

The accepted run.

object
id
required

Correlation id for this run; it appears on the status the updater writes.

string
maintenance_window_id

The fleet-wide maintenance window opened for the duration, or null if one could not be opened (the run still proceeds — silencing is a courtesy, not a precondition).

string | null
target_tag
required

The release the run targets.

string
Examplegenerated
{
"id": "example",
"maintenance_window_id": "example",
"target_tag": "example"
}

Not a published release tag

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

Role lacks ManageSystem

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

A run is already in flight

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 updater (upgrade_unsupported), the mechanism is switched off (upgrade_disabled), the updater is not running (upgrade_unavailable), or this core is not the leader

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