delete https://www.virustotal.com/api/v3/collections//relationships/hunting_rulesets
Use this endpoint to delete existing associations between Hunting rulesets and a certain IoC Collection.
This endpoint requires the user to be the owner or an editor of involved objects, and Hunting rulesets' descriptors as follows:
{
"data": [
{
"id": "<_string_> Hunting ruleset identifier",
"type": "hunting_ruleset"
}
]
}
To get the Hunting rulesets identifiers, you can first list the Hunting rulesets associated with the IoC Collection of your interest.
Examples
Delete associations between 20899097850 and 21595866703 Hunting rulesets and the IoC Collection with ab622fb5f4e6382109fe89ed466aafbaef1b79c31cb2c7e1d1f59ffde772715f identifier.
import requests
payload = {
"data":
[
{
"id": "20899097850",
"type": "hunting_ruleset"
},
{
"id": "21595866703",
"type": "hunting_ruleset"
}
]
}
id = "ab622fb5f4e6382109fe89ed466aafbaef1b79c31cb2c7e1d1f59ffde772715f"
url = f"https://www.virustotal.com/api/v3/collections/{id}/relationships/hunting_rulesets"
headers = {
"accept": "application/json","x-apikey": <api-key>,"content-type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)