Portainer icon

Portainer

Interact with Portainer via API

Actions190

Docker → Docker Dashboard

AI-generated

Overview

This node interacts with the Portainer API, specifically providing functionality related to Docker environments managed by Portainer. The "Docker Dashboard" operation fetches dashboard information for a specified Docker environment within Portainer. This is useful for users who want to programmatically retrieve an overview or status of their Docker environments directly from Portainer, enabling automation and integration into workflows such as monitoring, reporting, or triggering other actions based on Docker environment states.

Practical examples include:

  • Automatically retrieving Docker environment metrics or statuses to display in custom dashboards.
  • Integrating Docker environment data into incident management systems.
  • Triggering alerts or scaling operations based on Docker environment health or usage statistics.

Properties

Name Meaning
Environment Id Numeric identifier of the Docker environment within Portainer for which the dashboard data is requested.

Output

The node outputs JSON data representing the Docker dashboard information for the specified environment. This typically includes aggregated metrics, container statuses, resource usage, and other relevant details about the Docker environment as provided by the Portainer API.

If the node supports binary data output (not evident from the provided code), it would represent any binary content returned by the API, but this is unlikely for a dashboard operation.

Dependencies

  • Requires access to a Portainer instance with API enabled.
  • Needs an API authentication token credential configured in n8n to authenticate requests to the Portainer API.
  • The base URL for the Portainer API must be set in the credentials.
  • Uses the @devlikeapro/n8n-openapi-node package for OpenAPI-based request handling.

Troubleshooting

  • Authentication errors: Ensure that the API token or credentials are correctly configured and have sufficient permissions to access the Docker environment data.
  • Invalid Environment Id: Verify that the environment ID provided exists in the Portainer instance.
  • Network issues: Confirm that n8n can reach the Portainer API endpoint; check firewall and network settings.
  • Unexpected API responses: Check if the Portainer API version matches the expected schema used by the node; mismatches may cause errors.

Links and References

Discussion