Delete List using automation/command?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

Delete List using automation/command?

L1 Bithead

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

3 REPLIES 3

L2 Linker

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})

Why isn't this native to xsoar?

L0 Member

@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. 

  • 2220 Views
  • 3 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!