How to get the executionlog and outputs of certain runbook for last 1 months
I want to develop a runbook to get the execution log and outputs of certain runbook for last 1 month. and then pass the result to csv file each CI results in each row.
What is the URL to get all the execution step details and JSON query to get the each execution results and pass the each output to excel sheet?
If we are talking about runbooks from the OMi/BSM side of things and you want strictly that information, then you would have to check their documentation and see what their API allows you to see from the historical point of view.
If you want to further drill down to the flows that are used and get that information then that could be handled fairly easily:
- identify all of the flow uuids that the runbook utilizes
- get the run execution history for the last 30 days and place it ino the first sheet of a multi-sheet excel file. Save only the run id and the flow uuid (the rest of the data is meaningless for now) into separate collumns
- on the next sheet by using formulas save the execution ids of the uuids you are looking for
- activate all formulas using powershell. By default the oo excell operations will leave the formulas as text, but by running a powershell script that replaces = with = you can enable the formulas.
- on the third sheet save the flow details based on specific per execution id api calls.
Hope this helps,