Kv secrets engine via curl

Hi,
I have a secret in v2 of the kv engine. The path is drmkeys and the secret is called dashkey. CLI works fine to retrieve the key: $ ./vault kv get drmkeys/dashkey
But I’ve not been able to figure out the curl commands to GET the key via curl:
$ curl --header "X-Vault-Token: VAULT_TOKEN" --request GET http://127.0.0.1:8200/v2/kv/data/drmkeys/dashkey

How do you do that?
The documentation doesn’t clearly explain this with an example: KV - Secrets Engines - HTTP API | Vault by HashiCorp
Thank you,
Bob

1 Like

To get the curl version of 'kv get drmkeys/dashkey use:

 vault kv get -output-curl-string drmkeys/dashkey

Most likely issue though is that your KV engine is mounted as drmkeys/ and not kv/

2 Likes