Delete items from a Threat Profile

This endpoint deletes objects that are related to a Threat Profile. Available relationships are described in the Threat Profiles object Relationships section. This endpoint requires objects' descriptors and the user to be the owner or an editor of the Threat Profile.

You can also add new or update existing relationships between a Threat Profile and other objects.

Another editor or the owner of the Threat Profile can modify a user's privileges for it.

Examples

Remove access of user1 and user2 editors to the Threat Profile with 332e02da667746f180a9740e94a3ec98 identifier.

import requests

profile_id = "332e02da667746f180a9740e94a3ec98"
relationship = "editors"
payload = {
    "data":[
        {
            "type": "user",
            "id": "user1"},
        {
            "type": "user",
            "id": "user2"}
    ]
}
url = f"https://www.virustotal.com/api/v3/threat_profiles/{profile_id}/relationships/{relationship}"
headers = {
    "accept": "application/json","x-apikey": <api-key>
}
response = requests.delete(url, json=payload, headers=headers)

Revoke access for members of group1 and group2 with editor privilege to the Threat Profile identified as 332e02da667746f180a9740e94a3ec98.

import requests

profile_id = "332e02da667746f180a9740e94a3ec98"
relationship = "editors"
payload = {
    "data":[
        {
            "type": "group",
            "id": "group1"},
        {
            "type": "group",
            "id": "group2"}
    ]
}
url = f"https://www.virustotal.com/api/v3/threat_profiles/{profile_id}/relationships/{relationship}"
headers = {
    "accept": "application/json","x-apikey": <api-key>
}
response = requests.delete(url, json=payload, headers=headers)

Remove access of user1 and members of group1 with viewer privilege to the Threat Profile with 332e02da667746f180a9740e94a3ec98 identifier.

import requests

profile_id = "332e02da667746f180a9740e94a3ec98"
relationship = "viewers"
payload = {
    "data":[
        {
            "type": "user",
            "id": "user1"},
        {
            "type": "group",
            "id": "group1"}
    ]
}
url = f"https://www.virustotal.com/api/v3/threat_profiles/{profile_id}/relationships/{relationship}"
headers = {
    "accept": "application/json","x-apikey": <api-key>
}
response = requests.delete(url, json=payload, headers=headers)

Path Params
string
required

Threat Profile's ID

string
required

Relationship name from threat profile relationships section

Body Params
json
required

List of objects descriptors

Headers
string
required

Your API key

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json