Portainer icon

Portainer

Work with Portainer API data to manage Docker

Volume → Delete

AI-generated

Overview

This node operation deletes a Docker volume in a specified environment using the Portainer API. It is useful for managing Docker volumes by removing those that are no longer needed, helping to free up storage and maintain a clean Docker environment. For example, it can be used to delete a volume named 'my_volume' in environment ID '1'.

Use Case Examples

  1. Delete a Docker volume named 'my_volume' in environment ID '1' to free up disk space.
  2. Force delete a volume even if it is currently in use.

Properties

Name Meaning
Environment ID The ID of the environment/endpoint in Portainer where the volume exists.
Volume Name The name of the Docker volume to delete.
Force Delete Whether to force deletion even if the volume is currently in use.

Output

JSON

  • body - Response body from the Portainer API after attempting to delete the volume.

Dependencies

  • Portainer API with an API key credential for authentication

Troubleshooting

  • Ensure the Environment ID is correct and the environment is accessible.
  • Verify the volume name exists in the specified environment.
  • If force delete is false and the volume is in use, deletion will fail; consider enabling force delete if appropriate.
  • Check API key permissions to ensure the user has rights to delete volumes.

Links

Discussion