Portainer icon

Portainer

Work with Portainer API data to manage Docker

Secret → Get

AI-generated

Overview

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

  1. Fetch a secret by its ID to verify its properties or use it in a deployment pipeline.
  2. 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

Discussion