Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

what is the API that will capture list of component on specific master machine

avatar

the following API , print all components

curl -u admin:admin -H "X-Requested-By: ambari" -X GET http://localhost:8080/api/v1/clusters/HDP/components/ | grep component_name

in out case we need list of component per master machine

we have 3 master machines in the cluster

so what is the API that will capture the component on specific master machine ?

Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Super Guru

@Michael Bronson,

You can use the below API

curl -u admin:admin -H "X-Requested-By: ambari"-X GET http://localhost:8080/api/v1/clusters/HDP/hosts/{host-name}/host_components/ | grep component_name

Replace {host-name} with your master host name

Thanks,

Aditya

View solution in original post

1 REPLY 1

avatar
Super Guru

@Michael Bronson,

You can use the below API

curl -u admin:admin -H "X-Requested-By: ambari"-X GET http://localhost:8080/api/v1/clusters/HDP/hosts/{host-name}/host_components/ | grep component_name

Replace {host-name} with your master host name

Thanks,

Aditya