Public Preview
Threat Profile module is provided as a public preview and is subject to change. Use with caution.
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)