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 detailed inspection of Docker containers. The "Inspect" operation for the "Container" resource retrieves comprehensive metadata and configuration details about a specific container running in a Docker environment managed by Portainer.

Typical use cases include:

  • Debugging container issues by examining container configuration and state.
  • Auditing container settings such as mounted volumes, network settings, environment variables, and runtime parameters.
  • Automating infrastructure monitoring workflows that require container metadata.
  • Integrating container inspection data into broader DevOps or CI/CD pipelines.

For example, a user might want to inspect a container to verify its current status, resource limits, or network bindings before performing an update or restart.

Properties

Name Meaning
Environment ID The ID of the Portainer environment/endpoint where the container is running.
Container ID The unique identifier of the Docker container to inspect.

Output

The node outputs JSON data representing the full inspection details of the specified container. This includes all metadata returned by the Portainer API's container inspection endpoint, such as:

  • Container configuration (image, command, environment variables).
  • State information (running status, uptime, exit codes).
  • Network settings (ports, IP addresses).
  • Mount points and volume bindings.
  • Resource limits and usage statistics.

No binary data output is produced by 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 Portainer API base URL and API key from the configured credentials.

Troubleshooting

  • Invalid Environment ID or Container ID: If the IDs are incorrect or the container does not exist, the API will return an error. Verify the IDs are correct and the container is present in the specified environment.
  • Authentication Errors: Ensure the API key credential is valid and has sufficient permissions to query container details.
  • Network Connectivity Issues: Confirm that n8n can reach the Portainer API endpoint URL.
  • API Rate Limits or Timeouts: Large container inspection responses may cause timeouts; consider increasing timeout settings if applicable.

Links and References

Discussion