Actions88
- Container Actions
- Container List
- Container Create
- Container Inspect
- Container Top
- Container Logs
- Container Changes
- Container Export
- Container Stats
- Container Resize
- Container Start
- Container Stop
- Container Restart
- Container Kill
- Container Update
- Container Rename
- Container Pause
- Container Unpause
- Container Attach
- Container Attach Websocket
- Container Wait
- Container Delete
- Container Archive Info
- Container Archive
- Put Container Archive
- Container Prune
- Image Actions
- Network Actions
- Volume Actions
- Swarm Actions
- Node Actions
- Secret Actions
- System Actions
- Exec Actions
- Service Actions
- Task Actions
Overview
This node allows you to delete a Docker volume via the Portainer API. It is useful in scenarios where you want to programmatically manage Docker resources, specifically removing unused or unwanted volumes to free up space or clean up your Docker environment. For example, after stopping containers that used certain volumes, you might want to delete those volumes automatically as part of a cleanup workflow.
Properties
| Name | Meaning |
|---|---|
| EndpointID Name or ID | The Portainer endpoint to access Docker. Choose from a list of available endpoints or specify an ID. |
| Name | The name or ID of the Docker volume to delete. |
| Force | (Optional) Whether to force the removal of the volume. If true, the volume will be removed even if it is in use. |
Output
The node outputs JSON data representing the response from the Portainer API after attempting to delete the specified Docker volume. Typically, this will confirm whether the deletion was successful or provide error details if it failed.
No binary data output is involved.
Dependencies
- Requires a Portainer API instance accessible via an endpoint URL.
- Requires an API key credential for authenticating with the Portainer API.
- The node uses the Portainer API endpoint
/api/endpoints/{endpointId}/docker/volumes/{name}with an optionalforcequery parameter.
Troubleshooting
Common issues:
- Invalid or missing endpoint ID: Ensure the selected endpoint exists and is reachable.
- Volume not found: Verify the volume name or ID is correct.
- Permission denied: Check that the API key has sufficient permissions to delete volumes.
- Volume in use error: If the volume is currently used by a container, deletion may fail unless
Forceis set to true.
Error messages:
- "404 Not Found": The specified volume does not exist on the endpoint.
- "403 Forbidden" or authentication errors: The API key lacks required permissions.
- "Conflict" or similar when volume is in use: Use the
Forceoption to override.