Skip to content

Trigger daemon update for a node

POST
/api/system/daemon-updates/{nodeId}
curl --request POST \
--url https://opfield.example.com/api/system/daemon-updates/550e8400-e29b-41d4-a716-446655440000 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "now": true }'

Updates the daemon of a node to the latest release. While backups, image builds, Docker migrations, image pulls, container actions, storage copies, or container archive transfers run on the node, the update waits for them first: waitingForTasks in the response, metadata.updatePhase: waiting_for_tasks and metadata.updateWaitingForTasks on the node. After 30 minutes it goes ahead anyway and keeps a warning in metadata.lastUpdate.warnings. Nodes in a lease-mode Availability policy then wait for their peers (leaseSequenced). now: true waits for neither and ends the wait of an update already waiting (waitSkipped); skipping the peers is kept as a warning in metadata.lastUpdate.warnings. An update of a Docker or nginx node whose daemon advertises daemon_stream_handover_v1 keeps its relay stream sessions; metadata.lastUpdate.connections holds what the update kept and cut, and metadata.lastUpdate.serviceRestart says when the update restarted the whole service once for a newer launcher (or why not).

nodeId
required
string
>= 1 characters
Example
550e8400-e29b-41d4-a716-446655440000

Optional: { "now": true } to update without waiting for running tasks or lease peers

Media typeapplication/json
object
now

Update without waiting for the long tasks running on the node (they may fail) or for its lease peers. Also ends the wait of an update that already waits for them.

boolean
Examplegenerated
{
"now": true
}

Successful response

Media typeapplication/json
object
data
required

Resource object. Exact fields depend on the endpoint.

object
id
string
name
string
key
additional properties
Example
{
"data": {
"currentVersion": "1.2.3",
"latestVersion": "1.2.4",
"updateAvailable": true
}
}

Bad request

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"details": [
{
"path": [
"name"
],
"message": "Required"
}
]
}

Authentication required

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

Forbidden

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "FORBIDDEN",
"message": "Insufficient permissions"
}

Not found

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "NOT_FOUND",
"message": "Resource not found"
}

Conflict

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "CONFLICT",
"message": "Resource already exists"
}

Unprocessable entity

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "UNPROCESSABLE_ENTITY",
"message": "Request could not be processed"
}

Internal server error

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "INTERNAL_ERROR",
"message": "Internal server error"
}