How do you do POST along with ambari authentication?
curl -u admin:admin -H “X-Requested-By:ambari” -i -X POST -d @./payload http://<hostname>:8080/api/v1/clusters/HDP1/hosts/v<hostname>/host_components/METRICS_COLLECTOR
even though i give correct principal name still its not working, what is the correct syntax? any idea?
where payload has kerberos admin username / principal
{
“session_attributes” : {
“kerberos_admin” : {
“principal” : “admin/admin@<REALMNAME”,
“password” : “<pass>”
},
},
}