getCustomAutomations
Get the list of custom automations modified in last 30 days.
python · System Diagnostics and Health Check
Details
| ID | getCustomAutomations |
|---|---|
| Language | python |
| From Version | 6.10.0 |
| Docker Image | demisto/python3:3.12.13.11879924 |
| Tags | statusreview widget |
README
Get the list of custom automations modified in last 30 days
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | statusreview, widget |
Inputs
There are no inputs for this script.
Outputs
There are no outputs for this script.
import dateutil.parser import demistomock as demisto # noqa: F401 import pytz from CommonServerPython import * # noqa: F401 payload = {"query": "system:F"} res = demisto.executeCommand("core-api-post", {"uri": "automation/search", "body": json.dumps(payload)})[0]["Contents"][ "response" ] if not res["scripts"]: res["scripts"] = [] scriptsList = [] for item in res["scripts"]: script = {} insertion_date = dateutil.parser.parse(item["modified"]) diffretiation = pytz.utc.localize(datetime.utcnow()) - insertion_date if diffretiation.days < 30: script["name"] = item["name"] scriptsList.append(script) return_results({"total": len(scriptsList), "data": scriptsList})