Thanks sumit for the quick reply. Here is the output I received. I don't see any http property in the config .
I am using Ambari 2.0 version. 1) Retrieve tag info. curl -u user:xxxxxx http://ambari-server-host.us-west-2.compute.amazonaws.com:8080/api/v1/clusters/dc/hosts/awsdcdpmn01.dpst.internal/host_components/NAMENODE?fields=HostRoles/actual_configs/hdfs-site { "href" : " http://ambari-server-host.us-west-2.compute.amazonaws.com:8080/api/v1/clusters/dc/hosts/awsdcdpmn01.dpst.internal/host_components/NAMENODE?fields=HostRoles/actual_configs/hdfs-site ", "HostRoles" : { "cluster_name" : "dc", "component_name" : "NAMENODE", "host_name" : "awsdcdpmn01.dpst.internal", "actual_configs" : { "hdfs-site" : { "default" : "1" } } }, "host" : { "href" : " http://ambari-server-host.us-west-2.compute.amazonaws.com:8080/api/v1/clusters/dc/hosts/awsdcdpmn01.dpst.internal " } 2) Get the config info. curl -u user:xxxx http://ambari-server-host.us-west-2.compute.amazonaws.com:8080/api/v1/clusters/dc/configurations?type=hdfs-site&tag=1 { "href" : " http://ambari-server-host.us-west-2.compute.amazonaws.com:8080/api/v1/clusters/dc/configurations?type=hdfs-site ", "items" : [ { "href" : " http://ambari-server-host.us-west-2.compute.amazonaws.com:8080/api/v1/clusters/dc/configurations?type=hdfs-site&tag=1 ", "tag" : "1", "type" : "hdfs-site", "version" : 1, "Config" : { "cluster_name" : "dc" } } ] } On Sat, Jul 11, 2015 at 9:21 PM Sumit Mohanty <[email protected]> wrote: > Unfortunately, there is no single API for this. You need to merge data > from more than one API > > > * API to get the host(s) where the service is deployed (e.g. > http://ambari-server-host:8080/api/v1/clusters/c1/hosts/smc201-1.c.pramod-thangali.internal/host_components/NAMENODE?fields=HostRoles/actual_configs/hdfs-site > <http://smc201-1.c.pramod-thangali.internal:8080/api/v1/clusters/c1/hosts/smc201-1.c.pramod-thangali.internal/host_components/NAMENODE?fields=HostRoles/actual_configs/hdfs-site> > ) > > -- pick the tag for the actual config > > * Get the config and grep the property (e.g. > http://ambari-server-host:8080/api/v1/clusters/c1/configurations?type=hdfs-site&tag=version1436499674556 > <http://smc201-1.c.pramod-thangali.internal:8080/api/v1/clusters/c1/configurations?type=hdfs-site&tag=version1436499674556> > ) > > -- pick the correct property (e.g. dfs.namenode.http-address) > > > -Sumit > ------------------------------ > *From:* Anandha L Ranganathan <[email protected]> > *Sent:* Saturday, July 11, 2015 7:09 PM > *To:* [email protected] > *Subject:* Service endpoints URLs using Ambari APIs > > I am looking for an API that will provide all the service endpoints of > the components that are installed using Ambari > > > The api should return something like this. > > ResourceManager Logs = http://hostname1:8088/ > namenode = http://hostname:50070 > oozie = http://hostname2:11000 > It could be single API or multiple API call , anything is fine. > > Is there any API does exists ? > > > > >
