This should be a bug/feature request then. Anything that easily intelligible from the UI should also be from the API.
Really what the API should provide is it’s “service catalog”. To get this currently you need to browse to each service in the UI and see the URLs it lists. -- Sean Roberts @seano From: Sumit Mohanty <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Wednesday, June 21, 2017 at 5:38 AM To: "[email protected]" <[email protected]>, Alejandro Fernandez <[email protected]>, "[email protected]" <[email protected]> Subject: Re: Retrieving JDBC URLs from Ambari Server I believe the jdbc url is not stored as a single value in any of the configs. UI does the same too. So you may have read the individual values and construct the url. Get Outlook for iOS<https://aka.ms/o0ukef> _____________________________ From: Ray Chaudhuri, Shirsha (Nokia - IN/Bangalore) <[email protected]<mailto:[email protected]>> Sent: Tuesday, June 20, 2017 8:59 PM Subject: RE: Retrieving JDBC URLs from Ambari Server To: Alejandro Fernandez <[email protected]<mailto:[email protected]>>, <[email protected]<mailto:[email protected]>> Thanks Alejandro, however this is only going to give us the values for the keys in hive-site. The jdbc url itself will still need to be constructed using zk quorum, service discovery string keys. Isn’t there an easier way to just fetch the url, which ambari server anyways displays on its GUI for the Hive service? Regards Shirsha From: Alejandro Fernandez [ Alejandro Fernandez [mailto:[email protected]] Sent: Tuesday, June 20, 2017 5:40 AM To: [email protected]<mailto:[email protected]>; Ray Chaudhuri, Shirsha (Nokia - IN/Bangalore) <[email protected]<mailto:[email protected]>> Subject: Re: Retrieving JDBC URLs from Ambari Server This should all be available via the API, e.g., api/v1/clusters/$name/configurations?type=hive-site&tag=$latest Grabbing the latest config tag requires comparing the timestamps The Ambari Shell client may also have this logic already, same with /var/lib/ambari-server/resources/scripts/configs.sh get $ambari_server_ip $clustername hive-site $configkey Thanks, Alejandro From:"<Ray Chaudhuri>", "Shirsha (Nokia - IN/Bangalore)" <[email protected]<mailto:[email protected]>> Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Date: Monday, June 19, 2017 at 5:31 AM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Retrieving JDBC URLs from Ambari Server Hi, Is there a way to retrieve the jdbc url for HiveServer2, Spark Thrift Server etc, using Ambari REST APIs? Regards Shirsha
