Recreate a container
POST/apps/:id/recreate
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}/recreate"
Queues a container_recreate job (service class): it pulls the container's image again and replaces the container with one built from the same configuration, volumes and networks. If the pull or the creation of the replacement fails, or the replacement does not start, the original container is left as it was — same name and volumes, running again if it was running. A container started with --rm cannot be recreated: the Engine deletes it the moment it stops, so the job fails before changing anything. 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 and fails, changing nothing, if the array has stopped since.
Request
Responses
- 200
- default
The queued job.
An error response.