Hello Pradeep!
I believe the simplest way to execute that active response to multiple agents through the API is using the agents_list. Keep in mind that the Active Response functionality is designed to execute a script in response to the triggering of specific alerts based on the alert level or rule group.
I am not sure what your use case is. If the problem with using agents_list is getting the list of agents, you may consider putting all the target agents in a group and a create a script with multiple API calls, first, one call to get all the agents in that group (with this
API call) and then, with that information, execute the active response API call with the full agents_list.
Another option, depending on your use case, is to look into the
Wodle Command that allows executing commands on agents, it has several
scheduling options and can also be
centrally configured.
Here is a
blog post that explains a little more about how this works.
Regards!