Portainer icon

Portainer

Trabalhe com dados da API do Portainer para gerenciar Docker

Overview

This node integrates with the Portainer API to manage Docker environments, specifically allowing users to interact with Docker containers and other Docker resources through Portainer. The "Container - Get Many" operation retrieves a list of Docker containers from a specified environment (endpoint) managed by Portainer.

Typical use cases include:

  • Listing all running or stopped containers in a Docker environment.
  • Monitoring container states for automation workflows.
  • Integrating container data into broader DevOps or infrastructure management pipelines.

For example, you might use this node to fetch all containers on a specific Docker host to audit their status or trigger further actions based on container metadata.

Properties

Name Meaning
Environment ID The ID of the Portainer environment/endpoint where the Docker containers are managed.
Include All Boolean flag indicating whether to include stopped containers in the returned list.

Output

The node outputs JSON data representing an array of container objects retrieved from the Portainer API. Each object contains detailed information about a container, such as its ID, image, state, configuration, and runtime details.

No binary data output is involved in this operation.

Dependencies

  • Requires access to a Portainer instance with API enabled.
  • 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 requests.

Troubleshooting

  • Authentication errors: Ensure the API key credential is valid and has sufficient permissions to access the specified environment.
  • Invalid Environment ID: Verify that the provided environment ID corresponds to an existing endpoint in Portainer.
  • Empty results: If no containers are returned, check if the "Include All" property is set correctly to include stopped containers if desired.
  • Network issues: Confirm that n8n can reach the Portainer API endpoint URL without firewall or network restrictions.

Links and References

Discussion