Portainer icon

Portainer

Trabalhe com dados da API do Portainer para gerenciar Docker

Overview

This node integrates with the Portainer API to manage Docker images within a specified environment (endpoint). The "Image: Get" operation retrieves detailed information about a specific Docker image by its ID from the selected Portainer environment.

Common scenarios where this node is beneficial include:

  • Automating Docker image management workflows.
  • Fetching metadata or configuration details of a Docker image for auditing or reporting.
  • Integrating Docker image data retrieval into CI/CD pipelines or monitoring systems.

Practical example:

  • You want to get detailed information about a Docker image identified by abc123def456 in your Portainer environment with ID 1. This node will call the Portainer API and return the JSON details of that image, which you can then use downstream in your workflow.

Properties

Name Meaning
Environment ID The ID of the Portainer environment/endpoint where the Docker image resides.
Image ID The unique identifier of the Docker image to retrieve information about.

Output

The node outputs a JSON object containing the detailed information of the requested Docker image as returned by the Portainer API. This typically includes metadata such as image ID, tags, creation date, size, layers, and other Docker image attributes.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to a Portainer instance via its API.
  • 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 or Image ID parameters will cause the request to fail.
    • Incorrect API key or insufficient permissions may result in authentication errors.
    • Network connectivity issues to the Portainer server will prevent successful API calls.
  • Common error messages:

    • 401 Unauthorized: Check that the API key credential is correct and has sufficient permissions.
    • 404 Not Found: Verify that the Environment ID and Image ID are valid and exist in Portainer.
    • 500 Internal Server Error: Could indicate a problem on the Portainer server side; retry later or check server logs.
  • Resolution tips:

    • Double-check input parameters for correctness.
    • Ensure the Portainer API endpoint is reachable from n8n.
    • Confirm that the API key used has access rights to the specified environment and image.

Links and References

Discussion