Actions72
- Image Actions
- Network Actions
- Node Actions
- Registry Actions
- Secret Actions
- Service Actions
- Stack Actions
- Team Actions
- Template Actions
- User Actions
- Volume Actions
- Webhook Actions
- Config Actions
- Container Actions
- Edge Group Actions
- Edge Stack Actions
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 for users who want to programmatically access metadata and configuration details of secrets stored in their Docker Swarm clusters managed via Portainer.
Typical use cases include:
- Auditing or reviewing secret configurations before deployment.
- Automating infrastructure management workflows that require secret inspection.
- Integrating secret data retrieval into CI/CD pipelines or monitoring systems.
Example: Inspecting a secret with ID abc123def456 in environment 1 to verify its properties before using it in a service deployment.
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:
- Secret metadata such as ID, name, creation date, labels.
- Secret specification details like the encoded secret data (note: actual secret content may be base64 encoded or not directly exposed depending on API).
- Any associated labels or annotations.
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 Portainer API endpoint URL and API key from the credentials to perform HTTP GET requests.
Troubleshooting
- Invalid Environment ID or Secret ID: If the provided IDs do not exist or are incorrect, the API will return an error indicating the resource was not found. Verify the IDs are correct and correspond to existing resources in Portainer.
- Authentication Errors: Missing or invalid API key credentials will cause authentication failures. Ensure the API key is valid and has sufficient permissions.
- Network Issues: Connectivity problems to the Portainer server will result in request timeouts or connection errors. Check network accessibility and firewall settings.
- Permission Denied: The API key used must have permission to read secrets in the specified environment; otherwise, access will be denied.