Actions72
- Image Actions
- Config Actions
- Container Actions
- Edge Group Actions
- Edge Stack Actions
- Network Actions
- Node Actions
- Registry Actions
- Secret Actions
- Service Actions
- Stack Actions
- Team Actions
- Template Actions
- User Actions
- Volume Actions
- Webhook Actions
Overview
This node integrates with the Portainer API to manage Docker resources programmatically. Specifically, for the Network resource with the Get Many operation, it retrieves a list of Docker networks available in a specified Portainer environment (endpoint). This is useful for scenarios where you want to automate monitoring or management of Docker networks across different environments.
Practical examples include:
- Automatically listing all Docker networks in an environment to audit network configurations.
- Feeding network data into workflows that provision or clean up Docker resources.
- Integrating network information into dashboards or reports.
Properties
| Name | Meaning |
|---|---|
| Environment ID | The ID of the Portainer environment/endpoint from which to retrieve the Docker networks. |
Output
The node outputs JSON data representing the list of Docker networks retrieved from the specified environment. The structure corresponds to the Portainer API response for Docker networks and typically includes details such as network IDs, names, driver types, scope, containers attached, and other metadata.
No binary data output is involved in this operation.
Example output snippet (conceptual):
[
{
"Id": "network_id_1",
"Name": "bridge",
"Driver": "bridge",
"Scope": "local",
"Containers": { ... },
...
},
{
"Id": "network_id_2",
"Name": "host",
"Driver": "host",
"Scope": "local",
"Containers": { ... },
...
}
]
Dependencies
- Requires a valid Portainer API key credential configured in n8n.
- The node makes HTTP requests to the Portainer API base URL provided by the user credentials.
- The
Environment IDmust correspond to an existing environment/endpoint configured in Portainer.
Troubleshooting
- Invalid Environment ID: If the environment ID does not exist or is incorrect, the API will return an error. Verify the environment ID in your Portainer instance.
- Authentication Errors: Ensure the API key credential is valid and has sufficient permissions to access the environment's networks.
- Network Connectivity Issues: The node requires network access to the Portainer API endpoint. Check firewall rules and connectivity.
- Empty Results: If no networks are returned, confirm that the environment actually contains Docker networks and that the API user has permission to view them.