Reply
Highlighted
New Contributor
Posts: 1
Registered: ‎11-22-2013

CM REST API version 2 usage.

Hi,

 

I'm trying to do something very basic with the REST API: list all hosts that belong to a given cluster and then list what services are running on what hosts. 

 

/hosts?view=full seems to get some of the info but it seems that I have to parse out the cluster name rather than just be able to get the hosts associated for a specific cluster. I'd expected a /clusters/{clusterName}/hosts command or something like that.

 

Is there a way to filter/query the REST API to limit the output to limit the output to what I actually want? For example, I'd like to call /clusters/{clusterName}/services to just return the name of the hdfs service rather than get all the services for the complete cluster. Similarly, I'd like to know what services are running on what hosts.

 

What am I missing?


Thanks,

 

Gunnar

 

 

Announcements