How to acces kv by using HTTP API?


Now, in my consul client, I can get the kv in my server with ACL token:
consul kv get -token='test' micro/config/mysql

so how to get the kv by using HTTP API?
I’ve found these:

$ curl \    --header "X-Consul-Token: <consul token>" \

Is this the right request?


Hi @cheyuxuanll,

The KV store API can be accessed under the /v1/kv API endpoint.

The following command will attempt to retrieve the specified key from Consul.

$ curl --header "X-Consul-Token: <consul token>" \
1 Like