Docker icon

Docker

Interact with Docker via Portainer API

Actions107

Overview

This node allows users to interact with Docker containers through the Portainer API, specifically enabling the unpausing of a paused container. It is useful in automation workflows where container lifecycle management is required, such as resuming services after maintenance or automated recovery from paused states.

For example, if a container running a critical service was paused for resource management or troubleshooting, this node can be used to programmatically unpause it and restore its operation without manual intervention.

Properties

Name Meaning
EndpointID Name or ID The identifier of the Portainer endpoint to access. Users can select from a list of available endpoints or specify an ID via expression. This determines which Docker environment the command targets.
Id The ID or name of the Docker container to unpause. This specifies the exact container that will be resumed.

Output

The node outputs JSON data representing the response from the Portainer API after attempting to unpause the specified container. This typically includes status information about the container's state post-operation.

No binary data output is involved.

Dependencies

  • Requires access to a Portainer API instance.
  • Needs an API authentication token configured in n8n credentials to authorize requests.
  • The node uses the Portainer API endpoint /api/endpoints/{endpointId}/docker to perform Docker operations.

Troubleshooting

  • Common issues:
    • Invalid or missing EndpointID may cause connection failures.
    • Incorrect container Id will result in errors indicating the container was not found.
    • Insufficient permissions on the Portainer API token can lead to authorization errors.
  • Error messages:
    • "404 Not Found" likely means the container ID does not exist on the selected endpoint.
    • "401 Unauthorized" indicates invalid or missing API credentials.
  • Resolutions:
    • Verify the endpoint ID is correct and accessible.
    • Confirm the container ID or name is accurate.
    • Ensure the API key has sufficient permissions to manage containers.

Links and References

Discussion