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 secrets. Specifically, the Inspect operation for the Secret resource retrieves detailed information about a specific Docker Swarm secret identified by its ID within a given Portainer environment (endpoint). This is useful when you need to view metadata and configuration details of secrets used in your Docker Swarm clusters managed via Portainer.

Typical use cases include:

  • Auditing or verifying secret configurations before deployment.
  • Debugging issues related to secret usage in services.
  • Automating infrastructure management workflows that require secret inspection.

Example: You have a secret with ID abc123def456 in environment 1. Using this node operation, you can fetch all details about this secret, such as its name, creation date, labels, and other metadata.

Properties

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

Output

The node outputs JSON data representing the full details of the inspected secret as returned by the Portainer API. This typically includes fields such as:

  • Secret ID
  • Secret name
  • Creation timestamp
  • Labels (metadata tags)
  • Other Docker Swarm secret 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 Portainer API base URL must be set correctly in the credentials.

Troubleshooting

  • Invalid Environment ID or Secret ID: If the IDs are incorrect or do not exist, the API will return an error indicating the resource was not found. Verify the IDs are correct.
  • Authentication Errors: Ensure the API key credential has sufficient permissions and is valid.
  • Network Issues: Confirm that the n8n instance can reach the Portainer API endpoint.
  • Permission Denied: The API user may lack rights to view secrets; check Portainer user roles and permissions.

Links and References

Discussion