# LIST SECRETS

## Syntax

```sql
[ LIST | SHOW ] SECRETS;
```

## Description

This provides a list of [secrets](https://github.com/deltastreaminc/ds-docs-gitbook/blob/main-dcap/overview/core-concepts/secret.md) to which the user has access.

Secrets are listed only if the current role has USAGE privileges.

## Examples

#### List stores

The following provides a list of secrets to which the current user has access:

```sh
demodb.public/msk_public# LIST SECRETS;
LIST SECRETS;
+--------------+----------------+---------------------------------+----------------+---------+----------+-------------------------------+-------------------------------+
|  Name        |  Type          |  Description                    |  Access Region |  Status |  Owner   |  Created At                   |  Updated At                   |
+==============+================+=================================+================+=========+==========+===============================+===============================+
| my_secret    | generic_string | This is a generic_string secret | AWS us-east-1  | ready   | orgadmin | 2024-07-18 18:24:37 +0000 UTC | 2024-07-18 18:24:38 +0000 UTC |
+--------------+----------------+---------------------------------+----------------+---------+----------+-------------------------------+-------------------------------+
| an_api_token | generic_string | A secret for my API comms       | AWS us-east-1  | ready   | orgadmin | 2024-07-18 18:26:38 +0000 UTC | 2024-07-18 18:26:40 +0000 UTC |
+--------------+----------------+---------------------------------+----------------+---------+----------+-------------------------------+-------------------------------+
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.deltastream.io/reference/sql-syntax/command/list-secrets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
