diff --git a/admins_guide/adding_users_to_group.py b/admins_guide/adding_users_to_group.py index 0d046b0..570b33a 100644 --- a/admins_guide/adding_users_to_group.py +++ b/admins_guide/adding_users_to_group.py @@ -18,7 +18,7 @@ def add_users_to_group(apikey, group_id, email_addresses): """ Adding users (by their email addresses) to VirusTotal group. - VT API endpoint reference: https://developers.virustotal.com/reference/update-group-users + VT API endpoint reference: https://docs.virustotal.com/reference/update-group-users """ url = f"https://www.virustotal.com/api/v3/groups/{group_id}/relationships/users" headers = { diff --git a/admins_guide/getting_group_users_and_service_accounts.py b/admins_guide/getting_group_users_and_service_accounts.py index 135a9f0..c5e1dca 100644 --- a/admins_guide/getting_group_users_and_service_accounts.py +++ b/admins_guide/getting_group_users_and_service_accounts.py @@ -21,7 +21,7 @@ def get_users_or_service_accounts(apikey, group_id, relationship): """ Getting users or service accounts objects related to a group by group ID and 'users' or 'service_accounts' relationship. Requested users attributes: first_name,last_name,email. - VT API endpoint reference: https://developers.virustotal.com/reference/groups-relationships + VT API endpoint reference: https://docs.virustotal.com/reference/groups-relationships """ users = [] url = f"https://www.virustotal.com/api/v3/groups/{group_id}/{relationship}?attributes=first_name,last_name,email" diff --git a/admins_guide/getting_users_without_2fa.py b/admins_guide/getting_users_without_2fa.py index af8073f..887f6f7 100644 --- a/admins_guide/getting_users_without_2fa.py +++ b/admins_guide/getting_users_without_2fa.py @@ -21,7 +21,7 @@ def get_users_without_2fa(apikey, group_id): """ Getting users objects related to a group by group ID, filtering by 2fa_enabled = false. Requested users attributes: first_name,last_name,email. - VT API endpoint reference: https://developers.virustotal.com/reference/groups-relationships + VT API endpoint reference: https://docs.virustotal.com/reference/groups-relationships """ users = [] diff --git a/admins_guide/group_api_consumption.py b/admins_guide/group_api_consumption.py index fc3be20..c320835 100644 --- a/admins_guide/group_api_consumption.py +++ b/admins_guide/group_api_consumption.py @@ -20,7 +20,7 @@ def get_group_api_consumption(apikey, group_id, start_date, last_date): """ Getting VT API group consumption between 2 dates (by group ID). Please note that available data includes only the last 60 natural days so your range dates have to be part of the last 60 natural days. - VT API endpoint reference: https://developers.virustotal.com/reference/group-api-usage + VT API endpoint reference: https://docs.virustotal.com/reference/group-api-usage """ url = f"https://www.virustotal.com/api/v3/groups/{group_id}/api_usage?start_date={start_date}&end_date={last_date}" diff --git a/admins_guide/group_enterprise_current_month_consumption.py b/admins_guide/group_enterprise_current_month_consumption.py index 7a6f056..a8a7f63 100644 --- a/admins_guide/group_enterprise_current_month_consumption.py +++ b/admins_guide/group_enterprise_current_month_consumption.py @@ -20,7 +20,7 @@ def get_group_enterprise_current_month_consumption(apikey, user_id): """ Getting current month VT enterprise group consumption by user ID or user API key. - VT API endpoint reference: https://developers.virustotal.com/reference/get-user-overall-quotas + VT API endpoint reference: https://docs.virustotal.com/reference/get-user-overall-quotas """ url = f"https://www.virustotal.com/api/v3/users/{user_id}/overall_quotas" diff --git a/admins_guide/managing_users_api_allowance.py b/admins_guide/managing_users_api_allowance.py index 6f22e1a..32964b5 100644 --- a/admins_guide/managing_users_api_allowance.py +++ b/admins_guide/managing_users_api_allowance.py @@ -19,7 +19,7 @@ def update_api_cap(apikey, user_id, daily_limit): """ Update user API cap (by its user ID). - VT API endpoint reference: https://developers.virustotal.com/reference/patch-user-id + VT API endpoint reference: https://docs.virustotal.com/reference/patch-user-id """ url = f"https://www.virustotal.com/api/v3/users/{user_id}" diff --git a/admins_guide/managing_users_privileges.py b/admins_guide/managing_users_privileges.py index c9888e4..be72cd1 100644 --- a/admins_guide/managing_users_privileges.py +++ b/admins_guide/managing_users_privileges.py @@ -19,7 +19,7 @@ def grant_admin_privileges(apikey, group_id, email_addresses): """ Granting admin privileges to a list of users (by their email addresses). - VT API endpoint reference: https://developers.virustotal.com/reference/post-group-administrators + VT API endpoint reference: https://docs.virustotal.com/reference/post-group-administrators """ url = f"https://www.virustotal.com/api/v3/groups/{group_id}/relationships/administrators" @@ -36,7 +36,7 @@ def grant_admin_privileges(apikey, group_id, email_addresses): def revoke_admin_privileges(apikey, group_id, user_id): """ Revoking admin privileges of a user (by its user ID). - VT API endpoint reference: https://developers.virustotal.com/reference/delete-user-group-administrator + VT API endpoint reference: https://docs.virustotal.com/reference/delete-user-group-administrator """ url = f"https://www.virustotal.com/api/v3/groups/{group_id}/relationships/administrators/{user_id}" diff --git a/admins_guide/remove_users_from_group.py b/admins_guide/remove_users_from_group.py index a8fdb51..65efd15 100644 --- a/admins_guide/remove_users_from_group.py +++ b/admins_guide/remove_users_from_group.py @@ -18,7 +18,7 @@ def remove_user_from_group(apikey, group_id, user_id): """ Removing user (by its user ID) from VirusTotal group. - VT API endpoint reference: https://developers.virustotal.com/reference/delete-user-from-group + VT API endpoint reference: https://docs.virustotal.com/reference/delete-user-from-group """ url = f"https://www.virustotal.com/api/v3/groups/{group_id}/relationships/users/{user_id}" diff --git a/admins_guide/user_api_consumption.py b/admins_guide/user_api_consumption.py index eed88f5..b534f59 100644 --- a/admins_guide/user_api_consumption.py +++ b/admins_guide/user_api_consumption.py @@ -20,7 +20,7 @@ def get_group_users(apikey, group_id): """ Getting group users ID list (by group ID). - VT API endpoint reference: https://developers.virustotal.com/reference/get-group-users + VT API endpoint reference: https://docs.virustotal.com/reference/get-group-users """ users = [] @@ -38,7 +38,7 @@ def get_group_users(apikey, group_id): def get_user_api_consumption(apikey, user_id, start_date, last_date): """ Getting VT API user consumption between 2 dates (by user ID). Please note that available data includes only the last 60 natural days so your range dates have to be part of the last 60 natural days. - VT API endpoint reference: https://developers.virustotal.com/reference/user-api-usage + VT API endpoint reference: https://docs.virustotal.com/reference/user-api-usage """ url = f"https://www.virustotal.com/api/v3/users/{user_id}/api_usage?start_date={start_date}&end_date={last_date}" diff --git a/admins_guide/user_enterprise_current_month_consumption.py b/admins_guide/user_enterprise_current_month_consumption.py index fe04abe..5191371 100644 --- a/admins_guide/user_enterprise_current_month_consumption.py +++ b/admins_guide/user_enterprise_current_month_consumption.py @@ -20,7 +20,7 @@ def get_group_users(apikey, group_id): """ Getting group users ID list (by group ID). - VT API endpoint reference: https://developers.virustotal.com/reference/get-group-users + VT API endpoint reference: https://docs.virustotal.com/reference/get-group-users """ users = [] @@ -38,7 +38,7 @@ def get_group_users(apikey, group_id): def get_user_vt_enterprise_consumption(apikey, user_id): """ Getting current month VT enterprise user consumption by user ID. - VT API endpoint reference: https://developers.virustotal.com/reference/get-user-overall-quotas + VT API endpoint reference: https://docs.virustotal.com/reference/get-user-overall-quotas """ url = f"https://www.virustotal.com/api/v3/users/{user_id}/overall_quotas" diff --git a/API v2-v3 Migration Guide.md b/api_v3_migration_examples/API v2-v3 Migration Guide.md similarity index 94% rename from API v2-v3 Migration Guide.md rename to api_v3_migration_examples/API v2-v3 Migration Guide.md index f6a5f01..7b09cce 100644 --- a/API v2-v3 Migration Guide.md +++ b/api_v3_migration_examples/API v2-v3 Migration Guide.md @@ -130,7 +130,7 @@ if res and res.get('data', {}).get('type') == 'analysis': ### Get file report -A file’s report is a JSON data structure. For full context on file report structure refer to [File object description](https://developers.virustotal.com/reference/files). The main file report is limited mostly to the file's static properties and AV verdicts. For dynamic properties, refer to the Get file behaviour report section. +A file’s report is a JSON data structure. For full context on file report structure refer to [File object description](https://docs.virustotal.com/reference/files). The main file report is limited mostly to the file's static properties and AV verdicts. For dynamic properties, refer to the Get file behaviour report section. The code snippet below prints the whole JSON main (or static) report of a given file, based on its SHA256 hash. SHA1 and MD5 hashes can also be used to uniquely identify files. @@ -192,9 +192,9 @@ In addition to static analyses and AV verdicts, VirusTotal provides results of a The file behaviour report for v2 is a unique JSON structure covering all data gathered from detonating the sample in a single sandbox (unique integration available). -Unlike v2, v3 provides multiple sandbox integrations, and reports can be provided by sandbox ([1](https://developers.virustotal.com/reference/get-file-behaviour-id)) or by aggregating the reports from all sandboxes ([2](https://developers.virustotal.com/reference/get-all-behavior-reports-for-a-file)). Another difference is that in v3, the system API calls are not included in the reports. There’s a dedicated endpoint ([Get a detailed HTML behaviour report](https://developers.virustotal.com/reference/get-file-behaviour-html)) for them, which requires the sandbox providing this data to be identified. +Unlike v2, v3 provides multiple sandbox integrations, and reports can be provided by sandbox ([1](https://docs.virustotal.com/reference/get-file-behaviour-id)) or by aggregating the reports from all sandboxes ([2](https://docs.virustotal.com/reference/get-all-behavior-reports-for-a-file)). Another difference is that in v3, the system API calls are not included in the reports. There’s a dedicated endpoint ([Get a detailed HTML behaviour report](https://docs.virustotal.com/reference/get-file-behaviour-html)) for them, which requires the sandbox providing this data to be identified. -❗Please note that not all sandboxes can provide API calls. Refer to [In-house Sandboxes behavioural analysis products](https://support.virustotal.com/hc/en-us/articles/6253253596957-In-house-Sandboxes-behavioural-analysis-products) and [External behavioural engines sandboxes](https://support.virustotal.com/hc/en-us/articles/7904672302877-External-behavioural-engines-sandboxes) that show which sandboxes can provide the “__HTML behaviour report__” under the “**Low Level Report**” feature. +❗Please note that not all sandboxes can provide API calls. Refer to [In-house Sandboxes behavioural analysis products](https://docs.virustotal.com/docs/in-house-sandboxes) and [External behavioural engines sandboxes](https://docs.virustotal.com/docs/external-sandboxes) that show which sandboxes can provide the “__HTML behaviour report__” under the “**Low Level Report**” feature. #### Get file behaviour report - except API calls @@ -307,7 +307,7 @@ pprint(res) ### Get URL report -A URL’s report is a JSON data structure. For full context on URL report structure refer to [URL object description](https://developers.virustotal.com/reference/url-object). +A URL’s report is a JSON data structure. For full context on URL report structure refer to [URL object description](https://docs.virustotal.com/reference/url-object). The code snippet below, prints the whole JSON report of a given URL, that has to be [URL-safe](https://docs.python.org/3/library/base64.html#base64.urlsafe_b64encode) base64 encoded. ```python @@ -334,7 +334,7 @@ pprint(report) ### Get domain report -A domain’s report is a JSON data structure. For full context on domain report structure refer to [Domain object description](https://developers.virustotal.com/reference/domains-1). +A domain’s report is a JSON data structure. For full context on domain report structure refer to [Domain object description](https://docs.virustotal.com/reference/domains-object). The code snippet below prints the whole JSON report for a given domain. @@ -359,7 +359,7 @@ pprint(report) ### Get IP address report -A IP address’s report is a JSON data structure. For full context on IP address report structure refer to [IP address object description](https://developers.virustotal.com/reference/ip-object). +A IP address’s report is a JSON data structure. For full context on IP address report structure refer to [IP address object description](https://docs.virustotal.com/reference/ip-object). The code snippet below, prints the whole JSON report of a given IP address.