cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Who rated this post

L4 Transporter

Hi @Syedhkt ,

 

If you want to get only the numbers, you don't need to use a script. Dashboard data sources are capable of it. I am sending an example. You can play with data using an automation script for the second question. For example, If you want to play with the incident data, you can use the below commands to get the incidents and then do some calculations according to your needs.

res = demisto.executeCommand("GetIncidentsByQuery", {"fromDate": "5 days ago", "query":"-status:closed"})[0]['Contents']
incidents = json.loads(res)

As a reference, please see the attachment for a widget automation script which calculates the task duration using /workers/status API endpoint.




View solution in original post

Who rated this post