Support Questions

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

How can I use the Ambari REST API to get active configuration for a particular service?

avatar
Rising Star

A previous question (https://community.hortonworks.com/questions/5482/how-to-fetch-service-level-configuration-using-res.html) detailed how to navigate to particular configurations and extract certain values. Is there a way I can use the REST API to get the configuration that's currently in effect?

For example, this would show me all of the possible hive-site configurations

/api/v1/clusters/cluster/configurations?type=hive-site

How can I programattically determine which one is currently active?

1 ACCEPTED SOLUTION

avatar
Super Collaborator

@Aaron Dossett the following api call will give you the current config

/api/v1/clusters/<name of cluster>/configurations/service_config_versions?service_name.in(HIVE)&is_current=true

View solution in original post

2 REPLIES 2

avatar
Super Collaborator

@Aaron Dossett the following api call will give you the current config

/api/v1/clusters/<name of cluster>/configurations/service_config_versions?service_name.in(HIVE)&is_current=true

avatar
Guru