- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
06-08-2022 01:05 AM
Hi All,
I wanted to delete a list using a playbook tasks, but I dont find any automation that can achieve it. It only have createList, and remove data from List
May I know any workaround for it?
Regards,
Jia Kai
06-08-2022 01:50 AM - edited 06-08-2022 01:54 AM
Hey Jia Kai, you could write an automation that makes an API call to delete the list - you'll need to have the Demisto REST API integration configured for this.
The API method used is POST to the following endpoint: /lists/delete (if multi-tenant: /acc_<tenant_name>/lists/delete )
And the request body would be:{"id":"<list_name>"}
The basic script would look something like this (add whatever is needed to print a result, set to context, etc.)
listName = demisto.args().get("list_name")
body = {"id": listName}
demisto.executeCommand("demisto-api-post", {"uri":"/lists/delete", "body":body})
06-22-2023 11:47 AM
Why isn't this native to xsoar?
09-27-2023 06:44 AM
@Sec101 I am going to create a wrapper automation for this very functionality. Of course, this will be dependent on the "Core REST API" being configured and enabled.
I ran into a scenario requiring this capability and just completed a working demo.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!