getDeprecatedAutomations

Get the list of deprecated automations.

python · System Diagnostics and Health Check

Details

IDgetDeprecatedAutomations
Languagepython
From Version6.10.0
Docker Imagedemisto/python3:3.12.13.11879924
Tagsstatusreview

README

Get the list of deprecated automations

Script Data


Name Description
Script Type python3
Tags statusreview

Inputs


There are no inputs for this script.

Outputs


Path Description Type
DeprecatedAutomations   Unknown
import demistomock as demisto  # noqa: F401
from CommonServerPython import *  # noqa: F401

payload = {"query": "deprecated:T"}
res = demisto.executeCommand("core-api-post", {"uri": "automation/search", "body": json.dumps(payload)})[0]["Contents"][
    "response"
]

if not res["scripts"]:
    res["scripts"] = []

wList = []
for item in res["scripts"]:
    wList.append({"Name": item["name"]})

md = tableToMarkdown("List of Deprecated Automations", wList)
return_results(
    {
        "Contents": wList,
        "ContentsFormat": formats["text"],
        "HumanReadable": md,
        "EntryContext": {"DeprecatedAutomations": [wList]},
    }
)