Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Cloudera API get info about cluster with service and role?

avatar
New Contributor

Hello!


Now I can get info about cluster and get hight-level parameters, but I don't get info about hosts with info about cluster with help to:

 

api_instance = cm_client.ClustersResourceApi(cm_client)
clusters = api_instance.read_clusters(view="FULL")
cluster = clusters.item[0]

api_instance = cm_client.ServicesResourceApi(api_client)
services = api_instance.read_services(cluster.name, view="FULL")

api_instance = cm_client.HostsResourceApi(api_client)
hosts = api_instance.read_hosts()

 

In this case, after read_cluster I do not get information

about hosts and roles inside items, I need to get them separately.

 

Can I somehow "in one line" get information about the cluster and all the sheets nested in it? (Hosts, services, roles, etc.)

 

1 REPLY 1

avatar
Master Guru

@mananasaly The deployment json can be obtain from this command: http://<Cm-server-host>:7180/api/<apiversion>/cm/deployment

you can look at the name of the parameter. Does this something can help? 


Cheers!
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.