Need a restapi call to check the action completion status for each server of an action

HI All, Would you please help me with a restapi call which i can use to monitor the status of servers within an action to show up the status to be ‘Complete’, ‘pending restart’ or ‘Failed’?

Basically i am trying to monitor the servers status which are scheduled in advance for patching and to use the rest call to monitor their completion status. Thank you

I am doing this via python to check the status of the action when it fired up. It runs in the cyclical loop till the action status is complete. The function takes the actionid as parameter it keep checking the action status interval of 60-90sec. I have been using that fuction in number of the python code to automate the action.

You can use curl to extract the status if on Action ID
curl -X GET --insecure --user username:password https://BIGFIXSERVER:52311/api/action/{Action ID}/status

e.g.
curl -X GET --insecure --user username:password https://msc1bigv01.ms.mears:52311/api/action/85304/status

Then write it to a file or create a loop to check the status of each server

1 Like