getDetachedPlaybooks
Get the list of detached OOTB playbooks.
python · System Diagnostics and Health Check
Details
| ID | getDetachedPlaybooks |
|---|---|
| Language | python |
| From Version | 6.10.0 |
| Docker Image | demisto/python3:3.12.13.11879924 |
| Tags | statusreview widget |
README
Get the list of detached OOTB playbooks
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 demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 payload = {"query": "system:T"} res = demisto.executeCommand("core-api-post", {"uri": "playbook/search", "body": json.dumps(payload)})[0]["Contents"]["response"] if not res["playbooks"]: res["playbooks"] = [] playbooksList = [] for item in res["playbooks"]: playbook = {} if item.get("detached") is not None and item["detached"] is True: playbook["name"] = item["name"] playbooksList.append(playbook) return_results({"total": len(playbooksList), "data": playbooksList})