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 and other Docker-related resources. Specifically, the Image - Get History operation retrieves the history of a specified Docker image within a given environment (endpoint) managed by Portainer.

Use cases include:

  • Auditing the layers and changes made to a Docker image.
  • Debugging or inspecting image build history for compliance or troubleshooting.
  • Automating workflows that require image metadata or layer information.

For example, you might use this node to fetch the detailed history of an image before deciding whether to deploy it or to clean up unused image layers.

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 whose history you want to retrieve.

Output

The node outputs JSON data representing the history of the specified Docker image. This typically includes an array of image layers with details such as:

  • Layer IDs
  • Created timestamps
  • Commands used to create each layer
  • Size of each layer
  • Tags or comments associated with layers

This output allows users to analyze the composition and changes of the Docker image over time.

The node does not output binary data for 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

  • Invalid Environment ID or Image ID: If the provided IDs do not exist or are incorrect, the API will return an error. Verify the IDs in your Portainer dashboard.
  • Authentication Errors: Ensure the API key credential is valid and has sufficient permissions to access the image history.
  • Network Issues: Confirm that n8n can reach the Portainer API endpoint URL.
  • Empty or Unexpected Response: Check if the image actually has history data; some images may have minimal or no recorded history.

Links and References

Discussion