I need to get all the consul
kv values using http api. Currently I can get the one value with the following command.
curl -k -X GET https://consul.banuka1.us-east-2.test:8543/v1/kv/banuka-test/test-value?token=1995-08-18
it returns only the value specified in it (test-value
)
But I want to get all the values in the kv store
How can I do this? Is there a workaround here?
NOTE: I have already done this using consul
cli but I want to do this with https api
I usually do this to print all the keys and values.
v1/kv/?keys
- returns all the keysI then iterate each key and read the raw response and decode the base64 value.