{
  "schema_version": 2,
  "id": "integrate/redis-data-integration/reference/cli/redis-di-get-secret",
  "title": "redis-di get-secret",
  "url": "https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-get-secret/",
  "summary": "Gets a secret of a pipeline",
  "tags": [
    "redis-di"
  ],
  "last_updated": "2026-09-18T16:41:35+01:00",
  "page_type": "content",
  "content_hash": "77822b3b2b4386bf4feca2cf18f3403ca504ff238e339154ef67557cf866ce85",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Gets a single secret of a pipeline and prints it in the compact `list-secrets` table format. The API\nnever returns secret values, so the output shows only the key and whether it is set, not the stored\nvalue."
    },
    {
      "id": "usage",
      "title": "Usage",
      "role": "syntax",
      "text": "[code example]"
    },
    {
      "id": "options",
      "title": "Options",
      "role": "parameters",
      "text": "| Option             | Description                                                 |\n| :----------------- | :---------------------------------------------------------- |\n| `-p`, `--pipeline` | Pipeline to target (default `default`).                     |\n| `--db`             | Database the secret belongs to: a source name, or `target`. |\n| `-o`, `--output`   | Output format: `table` (default), `json`, or `yaml`.        |\n\nThis command also accepts the\n[global options](https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di#global-options)."
    },
    {
      "id": "example",
      "title": "Example",
      "role": "example",
      "text": "[code example]"
    }
  ],
  "examples": [
    {
      "id": "usage-ex0",
      "language": "plaintext",
      "code": "redis-di get-secret <key> [flags]",
      "section_id": "usage"
    },
    {
      "id": "example-ex0",
      "language": "bash",
      "code": "redis-di get-secret USERNAME --db mysql",
      "section_id": "example"
    }
  ]
}
