Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCUMENT] Updated Change #29419

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions website/content/api-docs/secret/kv/kv-v2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -511,25 +511,22 @@ this command.

To list secrets for KV v2, a user must have a policy granting them the list capability on this `/metadata/` path - even if all the rest of their interactions with the KV v2 are via the `/data/` APIs. Access to at least list the `/metadata/` path should typically also be granted.

| Method | Path |
|:-------|:-------------------------------------|
| `LIST` | `/:secret-mount-path/metadata/:path` |
| Method | Path |
|:-------|:------------------------------------------|
| `GET` | `/:secret-mount-path/metadata/?list=true` |

### Parameters

- `secret-mount-path` `(string: <required>)` - The path to the KV mount containing
the secret to list, such as `secret`. This is specified as part of the URL.

- `path` `(string: <required>)` – Specifies the path of the secrets to list.
This is specified as part of the URL.

### Sample request

```shell-session
$ curl \
--header "X-Vault-Token: ..." \
--request LIST \
https://127.0.0.1:8200/v1/secret/metadata/my-secret
--request GET \
https://127.0.0.1:8200/v1/secret/metadata/?list=true
```

### Sample response
Expand Down