I have been researching using API calls to run our Server Automation plans recently as we have started to leverage REST API for other BigFix functions in my environment with our migration into the Splunk world.
Server Automation is a heavily relied on function in my environment and my users complain about the performance of the Server Automation Domain navigation during our maintenance periods. Hence, my investigation of the API calls, which are lightning fast in comparison.
From all the research I have made via Google and the forums, it looks like it certainly be done….just trying to wrap my head around it all.
Based on my research, simple API calls can be made to “GET” an Automation Plan’s contents (by searching for the fixlet itself) and can be created via “POST” with the same content.
Where I am getting lost is the actual execution of the plan itself.
Reading this post with Paul Curren’s input XML is (Rest API To Initiate Server Automation Plan) Looks like XML definitely needed in order to kick of plans via API rather than just creating an action based off the FixletID, which I assumed was all that was needed (shown below)
If I do a Post to create a new action, with the full XML of my plan…I get a ‘400 error’ (will spare the space based on the size of the XML)
When I mimic what we use for other automations (based on FixletID) I get better results:
<?xml version="1.0" encoding="UTF-8"?>
The automation plan kicks off but immediately stops.
As mentioned by Paul in post #10 in the above Forums link…thatyou can not run REST API for a ‘Server Automation Plan’s’ execution based on the Automation Plan’s FixletID itself….rather we need to provide the XML data from the plan itself ( to ) to represent the required steps and target for this plan to run? (hopefully this isn’t too wordy and makes sense!)
(@HCL Would be great to Integrate Server Automation into WebUI! )