Delete items from an IoC collection

As explained in /collections, for the urls relationship you either use {"type": "url", "url": <a URL string>} or {"type": "url", "id": <a sha256 URL identifier>} as object descriptors. For domains and IP addresses you can use {"type": "domain", "id": <a domain>} or {"type": "ip_address", "id": <an IP address>}.

Examples

Delete an element, google.com domain, from an existing IoC collection.

import requests

object_id = "bd4dbd7a189ca9a31cb1b0bdbe64aaba6aa1454ddcfde707518b811d2bc5b363"
relationship = "domains"
url = f"https://www.virustotal.com/api/v3/collections/{object_id}/{relationship}"
payload = { "data": 
    [
        {
            "type": "domain",
            "id": "google.com"
        }
    ]
}
headers = {
    "accept": "application/json","x-apikey": <api-key>,"content-type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
Language
Click Try It! to start a request and see the response here!