Update a container
POST/apps/:id/update
Required role: admin. Only an account or token with the admin role can call this operation.
curl --request POST \
--header "Authorization: Bearer $HOSERVA_TOKEN" \
"https://$HOSERVA_HOST:8008/api/v1/apps/{id}/update"
Queues a container_update job (service class) that updates the container. The job pulls the container's image again first, which changes nothing about the container: a failed pull, or one that finds nothing newer, ends the job with no snapshot taken and the container left alone. Otherwise, when its appdata sits on the cache disk, a snapshot of it is written (a pre-update archive on the appdata backup's destinations) and the update does not go ahead if that snapshot cannot be written; then the container is replaced by one built from the pulled image with the same configuration, volumes and networks, as recreateApp does, and the image it ran before is kept locally for imageKeepDays. If any step after the pull fails, the container is left on its previous image, with the image tag the pull moved pointed back at it and the update's record removed, so nothing is left to revert. A container pinned to an image digest cannot be updated. Refused with 409 array_stopped while the array is stopped (maintenance mode) or its storage is not ready, and with 503 array_state_unknown if the array's state cannot be read; no job is queued. The job checks again when it runs.
Request
Responses
- 200
- default
The queued job.
An error response.