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 interact with Docker networks via the Portainer API, specifically enabling you to disconnect a container from a Docker network. It is useful in scenarios where you need to programmatically manage container networking, such as isolating containers, updating network configurations, or cleaning up network connections in automated workflows.
For example, you might use this node to disconnect a container from a specific network before removing the container or to dynamically adjust network connectivity based on deployment conditions.
Properties
| Name | Meaning |
|---|---|
| EndpointID Name or ID | The identifier of the Portainer endpoint to access. You can select from a list or specify an ID using an expression. This determines which Docker environment the operation targets. |
| Id | The Docker network's ID or name from which the container will be disconnected. |
| Container | The ID or name of the container that should be disconnected from the specified network. |
Output
The node outputs JSON data representing the response from the Portainer API after attempting to disconnect the container from the network. This typically includes status information about the success or failure of the disconnection operation.
No binary data output is involved.
Dependencies
- Requires access to a Portainer API instance.
- Requires an API key credential for authenticating requests to the Portainer API.
- The node uses the Portainer API endpoint URL and the selected endpoint ID to construct API requests.
- The
getEndpointsmethod dynamically loads available endpoints from Portainer for user selection.
Troubleshooting
Common issues:
- Invalid or missing Endpoint ID: Ensure the endpoint exists and is correctly selected.
- Incorrect Network ID or Container ID: Verify that the network and container identifiers are correct and exist in the targeted Docker environment.
- Authentication errors: Confirm that the API key credential is valid and has sufficient permissions.
- Network connectivity issues between n8n and the Portainer API server.
Error messages:
- Authorization failures usually indicate invalid credentials or insufficient permissions.
- "Network not found" or "Container not found" errors suggest incorrect IDs.
- Timeout or connection errors imply network or server availability problems.
Resolving these typically involves verifying configuration details, credentials, and network accessibility.