Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

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.

REST-URL to get the relevant information about the connectet remote Cluster

avatar
New Member

Hi,

i have add two Ambari-Clusters in the remote configuration of another Ambari-Server. To manage these Clusters I write for my own an Ambari-View. To get the relevant Information I use the Ambari-REST-API. For the local-CLuster I know the username, Password and the domainname of the Cluster. But for the remote Cluster I dont want to manage this Information twice. Can I get this Information with the rest-API? I have admin-Privileges on the main-Ambari-Server.

Best Regards

Dominik

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Dominik Ludwig

Please correct me uf my understanding regarding your query is not right.

.

We can register the remotecluster using ambari API as following, by passign the remote cluster credentials:

# curl -H "X-Requested-By: ambari" -u admin:admin  -X POST -d '{"ClusterInfo":{"name":"erie21","url":"http://mainremote.example.com:8080/api/v1/clusters/MainCluster","username":"admin","password":"admin"}}' http://standaloneambari.example.com:8080/api/v1/remoteclusters/RemoteClusterNameA


.

- However once the remote cluster is registered, it is not possible to see the password of remote cluster using the ambari APIs. You can only update the credentials using -X PUT method and the Put data as mentioned in the above API call.

curl -H "X-Requested-By: ambari" -u admin:admin -X GET http://standaloneambari.example.com:8080/api/v1/remoteclusters/RemoteClusterNameA

In the response of the above command we will not see the password only the username will be visible.

.

View solution in original post

1 REPLY 1

avatar
Master Mentor

@Dominik Ludwig

Please correct me uf my understanding regarding your query is not right.

.

We can register the remotecluster using ambari API as following, by passign the remote cluster credentials:

# curl -H "X-Requested-By: ambari" -u admin:admin  -X POST -d '{"ClusterInfo":{"name":"erie21","url":"http://mainremote.example.com:8080/api/v1/clusters/MainCluster","username":"admin","password":"admin"}}' http://standaloneambari.example.com:8080/api/v1/remoteclusters/RemoteClusterNameA


.

- However once the remote cluster is registered, it is not possible to see the password of remote cluster using the ambari APIs. You can only update the credentials using -X PUT method and the Put data as mentioned in the above API call.

curl -H "X-Requested-By: ambari" -u admin:admin -X GET http://standaloneambari.example.com:8080/api/v1/remoteclusters/RemoteClusterNameA

In the response of the above command we will not see the password only the username will be visible.

.