Support Questions

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

Ambari REST API + how to capture the active namenode IP from API

avatar

hi all

 

we have HDP version - 2.6.4 

 

with active and standby namenode

 

is it possible to capture the active namenode IP by REST API?

 

 

we try by the following API , but API not return any output 

 

curl -sH "X-Requested-By: ambari" -u admin:admin -H "X-Requested-By: ambari" -X GET http://master:8080/api/v1/clusters//services/HDFS

 

Capture.PNG

 

Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Master Collaborator
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
3 REPLIES 3

avatar

You are hitting with wrong values.

 

Find below example:

curl -u admin:password "http://{hostname}:8080/api/v1/clusters/{cluster _name}/host_components?HostRoles/"

avatar
Master Collaborator
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
New Contributor

fix: `componentname` should be `component_name`