@mike_bronson7
If you just want to find out specific services like HDFS / HIVE /SPARK2 to know whether they require restart or not then you can do this using filtering option service_name.in(xxx,yyy,zzz)
# curl -u admin:admin -H "X-Requested-By: ambari" -X GET "ttp://kerlatest1.example.com:8080/api/v1/clusters/KerLatest/host_components?HostRoles/stale_configs=true&HostRoles/service_name.in(HIVE,HDFS,SPARK2)"
Various Options to get Stale Config Component/Service details.
Similarly there are few other variants of the API call to find out and list the Services/Individual components which require restart.
# curl -u admin:admin -H "X-Requested-By: ambari" -X GET "ttp://kerlatest1.example.com:8080/api/v1/clusters/KerLatest/host_components?HostRoles/stale_configs=true&fields=HostRoles/service_name,HostRoles/host_name"
# curl -u admin:admin -H "X-Requested-By: ambari" -X GET "ttp://kerlatest1.example.com:8080/api/v1/clusters/KerLatest/host_components?HostRoles/stale_configs=true"
# curl -u admin:admin -H "X-Requested-By: ambari" -X GET "ttp://kerlatest1.example.com:8080/api/v1/clusters/KerLatest/host_components?HostRoles/stale_configs=true&fields=HostRoles/service_name"
How to restart All Stale Configurations using API call.
# curl -u admin:admin -H "X-Requested-By: ambari" -X POST -d '{"RequestInfo":{"command":"RESTART","context":"Restart all required services","operation_level":"host_component"},"Requests/resource_filters":[{"hosts_predicate":"HostRoles/stale_configs=true"}]}' "ttp://kerlatest1.example.com:8080/api/v1/clusters/KerLatest/requests"
.
Please change the Ambari Hostname/port and Cluster name in the above API calls.
I have changed "http://" to "ttp://" Please correct that protocol prefix before using the above mentioned API calls.