Portainer icon

Portainer

Interact with Portainer via API

Actions190

Docker → Docker Images List

AI-generated

Overview

This node operation lists Docker images from a specified environment managed via Portainer's API. It is useful for users who want to retrieve and inspect the available Docker images in their container environments, for example, to automate deployment workflows, monitor image usage, or manage image cleanup.

A practical example would be integrating this node into an automation workflow that periodically checks for unused Docker images and triggers alerts or cleanup actions.

Properties

Name Meaning
Environment Id The identifier of the Docker environment from which to list images.
Additional Fields Optional extra parameters; currently supports:
- With Usage Boolean flag to include image usage information in the response (true or false).

Output

The node outputs JSON data representing the list of Docker images retrieved from the specified environment. Each item typically includes details such as image ID, repository tags, creation date, size, and optionally usage statistics if requested.

If the "With Usage" option is enabled, additional fields related to how each image is used within containers or stacks may be included.

No binary data output is expected from this operation.

Dependencies

  • Requires access to a Portainer instance with API enabled.
  • Needs an API authentication token configured in n8n credentials to authorize requests.
  • The node uses the Portainer API endpoint /api as base URL, derived from the provided credentials.

Troubleshooting

  • Common issues:

    • Invalid or missing environment ID can cause the request to fail or return empty results.
    • Incorrect or expired API credentials will result in authentication errors.
    • Network connectivity problems to the Portainer server will prevent data retrieval.
  • Error messages:

    • Authentication failures usually indicate invalid API tokens; verify and update credentials.
    • "Environment not found" or similar errors suggest the environment ID does not exist or is inaccessible.
    • Timeout or connection errors imply network issues; check server availability and firewall settings.

Links and References

Discussion