Read KV Secrets

Hello Team,

I’ve put all my effor to read the secrets from KV. But none of the API is helping me out here. I’m trying to curl

–header “X-Vault-Token: XXXXXXXXXXX”” and it never returns the expected output and always says “Invalid path for a versioned K/V secrets engine”.

In the curl, If i change the v1 to v2, it gives me


I really don’t know how to take it forward. Because the API design is quite confusing. Like what is the path that we should provide and so on. Can somebody help me out here.

Thanks in Advance.

I don’t understand why people try to make their life harder … .get the cli working and then add -output-curl-string to get the API version.

vault kv read -output-curl-string secret/my-secret

The v1 in the URI is referring to the API version, NOT the KV version.

KVv2 uses an additional set of paths to enable the enhanced functionality - see the ACL Rules section of the KVv2 guide for more info.