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 Container resource and the Get operation, it retrieves detailed information about a specific Docker container identified by its ID within a given environment (endpoint) managed by Portainer.

Common scenarios where this node is beneficial include:

  • Monitoring container status and configuration in automated workflows.
  • Fetching container metadata for auditing or reporting purposes.
  • Integrating container details into broader DevOps pipelines or dashboards.

For example, you might use this node to get the current state and configuration of a container before deciding to restart or update it, or to log container details as part of an incident response workflow.

Properties

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

Output

The node outputs JSON data representing the full details of the specified Docker container as returned by the Portainer API. This includes container configuration, state, network settings, mounts, image details, and other metadata.

No binary data output is involved in this operation.

Dependencies

  • Requires a configured Portainer API credential with:

    • Base URL of the Portainer instance.
    • An API key for authentication.
  • The node makes HTTP GET requests to the Portainer API endpoint corresponding to the container's JSON details.

Troubleshooting

  • Common Issues:

    • Invalid or missing Environment ID or Container ID will cause the API request to fail.
    • Network connectivity issues to the Portainer server.
    • Insufficient permissions or invalid API key may result in authorization errors.
  • Error Messages:

    • 404 Not Found: The specified container ID does not exist in the given environment.
    • 401 Unauthorized: API key is invalid or missing required permissions.
    • 500 Internal Server Error: Server-side issue; check Portainer server health.
  • Resolutions:

    • Verify that the Environment ID and Container ID are correct.
    • Ensure the API key credential is valid and has sufficient access rights.
    • Confirm network connectivity to the Portainer API endpoint.

Links and References

Discussion