Remove a container
DELETE/apps/:id
Required role: admin. Only an account or token with the admin role can call this operation.
curl --request DELETE \
--header "Authorization: Bearer $HOSERVA_TOKEN" \
"https://$HOSERVA_HOST:8008/api/v1/apps/{id}"
Removes a stopped container (app_running, 409, for one that is not stopped). The container's appdata is kept unless deleteAppdata is explicitly true: then the bind-mount directories strictly inside the appdata location (the cache disk's appdata directory) are deleted, together with the container's anonymous volumes. Anything outside that location, the location itself, and any directory another container mounts, or that lies inside a directory of appdata another container mounts, is never deleted — a request that would delete one is refused (appdata_shared, 409) and removes nothing. deleteAppdata with no appdata location is refused (appdata_unavailable, 409). deleteAppdata is refused with 409 array_stopped while the array is stopped (maintenance mode) or its storage is not ready, because the cache disk is not mounted and the appdata on it could not be deleted, and with 503 array_state_unknown if the array's state cannot be read. A remove that keeps appdata is allowed on a stopped array. Every refusal happens before the container is removed.
Request
Responses
- 200
- default
The container was removed.
An error response.