Support Questions

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

how to find config type by API command

avatar

How to know the configuration type for parameter in ambari cluster by API

examples of configuration type - core-site, hdfs-site, mapred-queue-acls

lets say I want to find the configuration type for the parameter - "mapreduce.map.memory.mb” , in this case configuration type is mapred-site

Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Master Mentor

@uri ben-ari

Using Amabri API you can try the following:

curl -iv -u admin:admin -H "X-Requested-By: ambari" -X GET  http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/configurations?type=hdfs-site


Then get the latest version tag from the above call and then use that version in the API call.

curl -iv -u admin:admin -H "X-Requested-By: ambari" -X GET  http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/configurations?type=hdfs-site&tag=vers...

.

View solution in original post

13 REPLIES 13

avatar

from some reason I get - { "status" : 404, "message" : "The requested resource doesn't exist: Cluster not found, clusterName=plain_ambari" ( when I run this - curl -u admin:admin -H "X-Requested-By: ambari" -X GET http://ambarir02.urs.com:8080/api/v1/clusters/plain_ambari

Michael-Bronson

avatar

ok now I get all mapreduce.map.memory.mb parameters but not the config type ( I used grep to match them ) , still not get the config type for the parameter

Michael-Bronson

avatar

the main target is to find the config type because one of the script ( config.sh) arguments is the config type , so when we want to change the parameter value by the script we need the config type , but I not have the config type info , so how to know the config type when we want to change the parameter ?

Michael-Bronson

avatar

any new suggestion?

Michael-Bronson