Portainer icon

Portainer

Trabalhe com dados da API do Portainer para gerenciar Docker

Overview

This node integrates with the Portainer API to manage Docker Swarm configurations and other Docker-related resources. Specifically, for the Config resource with the Inspect operation, it retrieves detailed information about a specific Docker Swarm config by its ID within a given environment (endpoint).

Use cases include:

  • Inspecting configuration data used in Docker Swarm services.
  • Retrieving metadata and details of a config object to audit or verify settings.
  • Automating infrastructure management workflows that require fetching config details.

Example: You want to programmatically fetch the details of a Docker Swarm config named "my_config" in your Docker environment to check its content or labels before deploying a service.

Properties

Name Meaning
Environment ID The ID of the Portainer environment/endpoint where the Docker Swarm config resides.
Config ID The unique identifier of the Docker Swarm config to inspect.

Output

The node outputs JSON data representing the detailed inspection of the specified Docker Swarm config. This includes all metadata and properties returned by the Portainer API for that config, such as:

  • Config name
  • Data (usually base64 encoded)
  • Labels
  • Creation date
  • Other Docker Swarm config attributes

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to a Portainer instance with API access.
  • Needs an API key credential configured in n8n to authenticate requests to the Portainer API.
  • The node uses the base URL and API key from the credentials to make REST API calls.

Troubleshooting

  • Invalid Environment ID or Config ID: If the IDs provided do not exist or are incorrect, the API will return an error indicating the resource was not found. Verify the IDs are correct.
  • Authentication errors: Ensure the API key credential is valid and has sufficient permissions to access the environment and configs.
  • Network issues: Confirm that the Portainer instance is reachable from the n8n server.
  • API version mismatch: If Portainer updates its API, some fields might change; ensure compatibility with the current Portainer API version.

Links and References

Discussion