Skip to content

Instantly share code, notes, and snippets.

@cromat
Last active July 4, 2020 11:17
Show Gist options
  • Save cromat/968dcd9538396fa77e57a4f7809b46af to your computer and use it in GitHub Desktop.
Save cromat/968dcd9538396fa77e57a4f7809b46af to your computer and use it in GitHub Desktop.
Small script for deleting list of QRadar searches
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
# Example (with slash at the end) https://qradarurl.com/api/ariel/searches/
url = ""
username = ""
password = ""
session = requests.Session()
session.auth = (username, password)
# Paste search ids here. You can fetch them with GET on /api/ariel/searches
search_ids = [
]
for i, search_id in enumerate(search_ids):
print(f'{i + 1} of {len(search_ids)} {search_id}')
response = session.request("DELETE", url + search_id, headers={}, data={}, verify=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment