Created on 10-05-2016 09:14 PM - edited 08-19-2019 03:56 AM
In the Ambari GUI, I can enable and disable the Demo LDAP under service actions on the Knox page.
I am wonder if it is enable to enable / disable the Demo LDAP using the Ambari API <ambri-ip>:8080/api/v1/clusters/:clustername/
If it is, what is the endpoint?
Changing category as this is more of an Ambari related question
Thanks,
Eric
Created 10-07-2016 03:45 AM
Try this one to start Demo LDAP
curl -i -uadmin:admin -H 'X-Requested-By: ambari' -X POST -d '{"RequestInfo":{"context":"Start Demo LDAP","command":"STARTDEMOLDAP"},"Requests/resource_filters":[{"service_name":"KNOX","component_name":"KNOX_GATEWAY","hosts":"$knox_gateway_hostname"}]}' http://$ambari_server:8080/api/v1/clusters/$cluster_name/requests
To stop Demo LDAP
curl -i -uadmin:admin -H 'X-Requested-By: ambari' -X POST -d '{"RequestInfo":{"context":"Stop Demo LDAP","command":"STOPDEMOLDAP"},"Requests/resource_filters":[{"service_name":"KNOX","component_name":"KNOX_GATEWAY","hosts":"$knox_gateway_hostname"}]}' http://$ambari_server:8080/api/v1/clusters/$cluster_name/requests
Created 10-07-2016 03:45 AM
Try this one to start Demo LDAP
curl -i -uadmin:admin -H 'X-Requested-By: ambari' -X POST -d '{"RequestInfo":{"context":"Start Demo LDAP","command":"STARTDEMOLDAP"},"Requests/resource_filters":[{"service_name":"KNOX","component_name":"KNOX_GATEWAY","hosts":"$knox_gateway_hostname"}]}' http://$ambari_server:8080/api/v1/clusters/$cluster_name/requests
To stop Demo LDAP
curl -i -uadmin:admin -H 'X-Requested-By: ambari' -X POST -d '{"RequestInfo":{"context":"Stop Demo LDAP","command":"STOPDEMOLDAP"},"Requests/resource_filters":[{"service_name":"KNOX","component_name":"KNOX_GATEWAY","hosts":"$knox_gateway_hostname"}]}' http://$ambari_server:8080/api/v1/clusters/$cluster_name/requests