Canonical: https://weaveos.com/reference/hashicorp-vault/list-kv-secret-keys

1. [Software capabilities](https://weaveos.com/reference)
2. /[HashiCorp Vault](https://weaveos.com/reference/hashicorp-vault)
3. /List Vault KV v2 keys and folders

[HVHashiCorp Vault](https://weaveos.com/reference/hashicorp-vault)

# List Vault KV v2 keys and folders

List key names under a Vault KV v2 folder with vault kv list or the HTTP metadata endpoint. Grant list on the metadata folder to inventory names without granting access to secret values.

Documentation reviewed November 27, 2026 · 2 methods with sources

## Ways to do it

1. [1CLI: vault kv list](https://weaveos.com/reference/hashicorp-vault/list-kv-secret-keys#method-1)
2. [2API: LIST /v1/{mount}/metadata/{path}](https://weaveos.com/reference/hashicorp-vault/list-kv-secret-keys#method-2)

CLI

### vault kv list

Use -mount to select the KV v2 engine and list key names below a folder.

[Read source: Vault kv list command](https://developer.hashicorp.com/vault/docs/commands/kv/list)

- Requirements

  Vault CLI, VAULT\_ADDR, token, and list capability on metadata path.

- Limitations

  The argument identifies a folder. A folder entry ends in a slash and requires another request to list its children.

Example shell

Copy

```
vault kv list -mount=secret "team/"
```

API

### LIST /v1/{mount}/metadata/{path}

Send LIST to the KV v2 metadata path to retrieve names and child folders.

[Read source: Vault KV v2 list secrets API](https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2#list-secrets)

- Requirements

  A Vault HTTPS address, a valid X-Vault-Token with list on the metadata folder, and the KV v2 mount name.

- Limitations

  The list returns every key name in the authorized folder without per-key ACL filtering. Keep sensitive information out of key names.

Example shell

Copy

```
curl --fail --request LIST "$VAULT_ADDR/v1/secret/metadata/team/" -H "X-Vault-Token: $VAULT_TOKEN"
```

## More from HashiCorp Vault

[View all 1 HashiCorp Vault tasks](https://weaveos.com/reference/hashicorp-vault)
