Skip to main content

Stop container

POST/api/docker/{name}/stop

Stops one container. Protection: token and confirm: true in the body. A missing or non-boolean confirm returns 400, and the string "true" does not count.

Authorizations

Authorizationstringheaderrequired

The token you start the server with: homebutler serve --token <token>, or web.token in the config file. Send it as Authorization: Bearer <token>. When the server has a token, every /api/ route except the CORS preflight requires it, reads included.

Path parameters

namestringrequired

The container name, from List containers.

Example: whoami

Body

application/json
confirmbooleanrequired

Must be the boolean true.

Available options: true

Response

200 · application/json

The container stopped.

actionstringrequired

What was done.

Available options: restartstop
containerstringrequired

The container name.

statusstringrequired

ok.

Available options: ok