Stacks

Tear down stack

Changed on

Runs docker compose down for the stack, removing containers and networks. The stack definition remains on disk. Requires stack:deploy permission. Pass removeVolumes=true to also remove compose volumes when the node advertises the stack-down-remove-volumes capability. A volume removal is refused with 423 when the stack declares a recovery repository volume, or when its volumes could not be read; nothing is stopped.

post/api/stacks/{stackName}/down

Request

  • Base URL
    https://localhost:1852
  • URL
    https://localhost:1852/api/stacks/{stackName}/down
  • Auth
    HTTP bearer

Path parameters

stackNamestring required
Example:my-stack

Stack directory name. Must match ^[a-zA-Z0-9_-]+$ (alphanumeric characters, hyphens, and underscores only). Returns 400 Invalid stack name if the name contains path separators, dots, spaces, or other special characters.

Query parameters

removeVolumesboolean

When true, runs docker compose down --volumes. Only honored when the target node advertises stack-down-remove-volumes.

Headers

x-node-idinteger
Example:1

Target a specific node by ID. If omitted, the default node is used. Can also be passed as ?nodeId= query parameter.

Response

Command started.

statusstring required

Example response

{
  "status": "Command started"
}

Changes