Details
| ID | IsListExist |
|---|---|
| Language | python |
| From Version | 5.0.0 |
| Docker Image | demisto/python3:3.12.13.10404775 |
| Tags | Condition |
README
Checks if a list exists in the Cortex XSOAR lists.
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | Condition |
Inputs
| Argument Name | Description |
|---|---|
| listName | The list name to check. |
Outputs
There are no outputs for this script.
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 def main(): list_name = demisto.args()["listName"] res = demisto.executeCommand("getList", {"listName": list_name}) res = res[0] if res["Type"] == entryTypes["error"] and "Item not found" in res["Contents"]: demisto.results("no") else: demisto.results("yes") if __name__ in ("__main__", "__builtin__", "builtins"): main()