Portainer icon

Portainer

Work with Portainer API data to manage Docker

Container → Get

AI-generated

Overview

This node operation retrieves detailed information about a specific Docker container managed by Portainer. It is useful for scenarios where you need to inspect the configuration, status, and metadata of a container by its ID within a specified environment (endpoint). For example, you might use this operation to monitor container health, debug issues, or gather container details for reporting.

Use Case Examples

  1. Get detailed information about a container by specifying its Container ID and Environment ID in Portainer.
  2. Use this operation to inspect a container's configuration and runtime status for troubleshooting.

Properties

Name Meaning
Environment ID The ID of the environment/endpoint in Portainer where the container is running. This is required to target the correct Docker environment.
Container ID The unique identifier of the container to retrieve information about. This is required to specify which container to get details for.
Request Options Additional request settings such as batching, SSL certificate validation, proxy, and timeout to customize the API request behavior.

Output

JSON

  • id - The unique identifier of the container.
  • name - The name of the container.
  • image - The Docker image used by the container.
  • state - The current state of the container (e.g., running, stopped).
  • status - The status message of the container.
  • created - Timestamp when the container was created.
  • ports - Network ports exposed by the container.
  • mounts - Volumes or mounts attached to the container.
  • config - Configuration details of the container.
  • networkSettings - Network settings and details of the container.

Dependencies

  • Portainer API access with an API key credential

Troubleshooting

  • Ensure the Environment ID and Container ID are correct and correspond to existing resources in Portainer.
  • Check network connectivity and API access permissions to the Portainer environment.
  • If SSL issues occur, consider enabling the 'Ignore SSL Issues' option if appropriate.
  • Timeout errors may require increasing the timeout setting in Request Options.

Links

Discussion