Portainer icon

Portainer

Trabalhe com dados da API do Portainer para gerenciar Docker

Overview

This node integrates with the Portainer API to manage Docker resources programmatically. Specifically, for the Image resource with the Get Many operation, it retrieves a list of Docker images available in a specified Portainer environment (endpoint). This is useful for scenarios where you want to automate monitoring, auditing, or managing Docker images across your container environments.

Practical examples:

  • Automatically fetching all Docker images from a specific environment to display or log them.
  • Integrating image listing into CI/CD pipelines to verify available images before deployment.
  • Auditing images for cleanup or compliance purposes.

Properties

Name Meaning
Environment ID The ID of the Portainer environment/endpoint from which to retrieve Docker images.

Output

The node outputs JSON data representing the list of Docker images retrieved from the specified environment. Each item in the output corresponds to an image object as returned by the Portainer API's /docker/images/json endpoint. The structure typically includes details such as image ID, repository tags, creation date, size, and other metadata.

No binary data output is involved in this operation.

Dependencies

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

  • Common issues:

    • Invalid or missing Environment ID: Ensure the environment ID corresponds to a valid Portainer endpoint.
    • Authentication errors: Verify that the API key credential is correctly set up and has sufficient permissions.
    • Network connectivity: Confirm that n8n can reach the Portainer API endpoint URL.
  • Common error messages:

    • 401 Unauthorized: Indicates invalid or missing API key; check credential configuration.
    • 404 Not Found: The specified environment ID does not exist; verify the ID.
    • 500 Internal Server Error: Could indicate server-side issues on Portainer; retry later or check Portainer logs.

Links and References

Discussion