Actions86
- Config Actions
- Container Actions
- Edge Group Actions
- Edge Stack Actions
- Environment Actions
- Image Actions
- Network Actions
- Node Actions
- Registry Actions
- Secret Actions
- Service Actions
- Setting Actions
- Stack Actions
- System Actions
- Team Actions
- Template Actions
- User Actions
- Volume Actions
- Webhook Actions
Secret → Get
AI-generatedOverview
This node operation retrieves a Docker Swarm secret by its ID from a specified environment/endpoint in Portainer. It is useful for managing secrets in Docker Swarm clusters, allowing users to fetch details of a specific secret for inspection or further processing.
Use Case Examples
- Fetch a secret by its ID to verify its properties or use it in a deployment pipeline.
- Retrieve secret details to audit or update secret configurations in a Docker Swarm environment managed by Portainer.
Properties
| Name | Meaning |
|---|---|
| Environment ID | The ID of the environment/endpoint in Portainer where the secret is located. |
| Secret ID | The ID of the Docker Swarm secret to retrieve. |
| Request Options | Additional HTTP request options such as batching, SSL certificate validation, proxy settings, and timeout configuration to customize the API call behavior. |
Output
JSON
id- The unique identifier of the secret.name- The name of the secret.createdAt- Timestamp when the secret was created.updatedAt- Timestamp when the secret was last updated.labels- Labels associated with the secret for categorization or metadata.data- The secret data, typically base64 encoded.
Dependencies
- Portainer API with an API key credential for authentication
Troubleshooting
- Ensure the Environment ID and Secret ID are correct and correspond to existing resources in Portainer.
- Check API key credentials and permissions to access secrets in the specified environment.
- Verify network connectivity and proxy settings if used.
- If SSL issues occur, consider enabling the option to ignore SSL certificate validation, but be aware of security risks.
Links
- Portainer API Secrets Documentation - Official documentation for managing Docker Swarm secrets via Portainer API.