Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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