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 environments, specifically Docker Swarm nodes in this context. The "Node" resource with the "Get" operation allows users to retrieve detailed information about a specific Docker Swarm node by its ID within a given environment (endpoint).
Common scenarios where this node is beneficial include:
- Monitoring and managing individual nodes in a Docker Swarm cluster.
- Automating infrastructure audits or inventory by fetching node details.
- Integrating node status checks into CI/CD pipelines or alerting systems.
Practical example:
- You want to get the current state and metadata of a particular Docker Swarm node identified by its Node ID in your Portainer-managed environment to verify its availability or configuration before deploying services.
Properties
| Name | Meaning |
|---|---|
| Environment ID | The ID of the Portainer environment/endpoint where the Docker Swarm node resides. |
| Node ID | The unique identifier of the Docker Swarm node you want to retrieve information for. |
Output
The node outputs JSON data representing the detailed information of the specified Docker Swarm node as returned by the Portainer API. This typically includes properties such as node status, role, availability, labels, and other metadata related to the node's configuration and state within the swarm.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to a Portainer instance with API access.
- Needs an API key credential configured in n8n to authenticate requests to the Portainer API.
- The node uses the base URL and API key from the configured credentials to make HTTP GET requests to the endpoint
/endpoints/{environmentId}/docker/nodes/{nodeId}.
Troubleshooting
- Invalid Environment ID or Node ID: If either ID is incorrect or does not exist, the API will return an error indicating the resource was not found. Verify that the IDs are correct and correspond to existing resources in Portainer.
- Authentication Errors: Missing or invalid API key credentials will cause authentication failures. Ensure the API key is valid and has sufficient permissions.
- Network Issues: Connectivity problems between n8n and the Portainer server can cause request failures. Check network accessibility and firewall settings.
- API Rate Limits or Server Errors: If the Portainer API is overloaded or misconfigured, it may return errors. Review Portainer logs and API limits.
Links and References
- Portainer API Documentation
- Docker Swarm Nodes API Reference (Docker official API)
- Portainer Official Website