Ecwid / consul-api

Java client for Consul HTTP API
Apache License 2.0
416 stars 177 forks source link

How to get only one service specific data /v1/agent/service/:service_id #177

Open gouthamkunduru90 opened 5 years ago

gouthamkunduru90 commented 5 years ago

How to get only one service specific data /v1/agent/service/:service_id I have consul api as dependency in my spring project pom. i found a method getAgentServices() which will return all the services registered with consul but i want to fetch only one service related metadata using /v1/agent/service/:service_id. how to pass serviceid?

gouthamkunduru90 commented 5 years ago

i need to pass X-consul-token and servieId to get the specific service related data

Anricx commented 4 years ago

image Please add this feature!

gary258796 commented 10 months ago

After reviewing the code, to support /v1/agent/service/:service_id, the interface AgentClient has to add a new method.

I think if an application needs to get info from this API very often, it will be nice to just only get the response of target service only instead of getting all services info.

The AgentClient has no support of these APIs now :

I recommend that if we decided to add support of /v1/agent/service/:service_id, why not add all three unsupported API at the same time.