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.

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