She doesn't want to restart a single service but all the services in a cluster/host without providing the list of components. I tried to find that too but since Ambari itself builds that list when you say "Restart all", I guess there is no such API
On 18 September 2017 at 14:17, Jonathan Hurley <[email protected]> wrote: > Depending on which version of Ambari you are on, a request like this might > work: > > POST api/v1/clusters/<cluster-name>/requests > > { > "RequestInfo": > { > "command":"RESTART", > "context":"Restart all ZooKeeper Clients Across the Cluster", > "operation_level": { > "level":"HOST", > "cluster_name":"c1" > } > },"Requests/resource_filters":[ > { > "service_name": "ZOOKEEPER", > "component_name": "ZOOKEEPER_CLIENT", > "hosts_predicate":"HostRoles/component_name=ZOOKEEPER_CLIENT" > } > ] > } > > On Sep 18, 2017, at 7:19 AM, Latha Appanna <[email protected]> wrote: > > Hello, > > Do we have ambari REST api to RESTART all clients/refresh all client > configs without specifying the list of service/components? > > https://cwiki.apache.org/confluence/display/AMBARI/ > Restarting+host+components+via+the+API > I know we already have this, but it requires one to specify all the > required hostname, service-name and components > > > Thanks & Regards, > Latha > > >
