Actions86
- Config Actions
- Container Actions
- Edge Group Actions
- Edge Stack Actions
- Environment Actions
- Image Actions
- Network Actions
- Node Actions
- Registry Actions
- Secret Actions
- Service Actions
- Setting Actions
- Stack Actions
- System Actions
- Team Actions
- Template Actions
- User Actions
- Volume Actions
- Webhook Actions
Network → Delete
AI-generatedOverview
This node operation deletes a Docker network in a specified environment using the Portainer API. It is useful for managing Docker networks by removing unused or obsolete networks to maintain a clean and efficient Docker environment. For example, a user can delete a network by providing the environment ID and the network ID, optionally forcing the deletion even if the network is in use.
Use Case Examples
- Deleting a Docker network by specifying the environment ID and network ID.
- Force deleting a network that is currently in use to free up resources.
Properties
| Name | Meaning |
|---|---|
| Environment ID | The ID of the environment/endpoint in Portainer where the network exists. |
| Network ID | The ID of the network to be deleted. |
| Force Delete | Whether to force deletion even if the network is currently in use. |
Output
JSON
body- The response body from the Portainer API after attempting to delete the network, typically indicating success or failure.
Dependencies
- Portainer API with an API key credential for authentication.
Troubleshooting
- Ensure the environment ID and network ID are correct and exist in Portainer.
- If force delete is false and the network is in use, deletion will fail; set force delete to true to override.
- Check API key and base URL credentials for proper authentication and connectivity.
- Timeouts or SSL issues may occur; configure request options accordingly.
Links
- Portainer API - Delete Network - Official Portainer API documentation for deleting a network.