getDeprecatedPlaybooks

Get the list of deprecated playbooks.

python · System Diagnostics and Health Check

Details

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

README

Get the list of deprecated playbooks

Script Data


Name Description
Script Type python3
Tags statusreview

Inputs


There are no inputs for this script.

Outputs


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

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

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

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

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