https://investigate.umbrella.com/domain-
view/name/cisco.com/view via the user interface, you
see a screen like the one shown in Figure 11-3.
Figure 11-3 Umbrella Investigate API via the UI for
cisco.com
As you can see, the domain cisco.com is classified as
being Benign, and the SecureRank score is 2. Therefore,
cisco.com is a safe domain. Now let’s look at the same
operation but via the Investigate API. The API to call is
https://investigate.api.umbrella.com/domains/categoriz
ation/cisco.com. Example 11-7 shows a Python requests
command that makes an API call with the appropriate
API key.
Example 11-7 Getting Domain Categorization by
Using the Investigate API
Click here to view code image
""" Domains categorization using the
Investigate API """
import requests
url =
"https://investigate.api.umbrella.com/domains/categorization/cisco.com"
querystring = {"showLabels":""}
headers = {
'authorization': "Bearer deadbeef-24d7-
40e1-a5ce-3b064606166f",
'cache-control': "no-cache",
}
response = requests.request("GET", url,
headers=headers, params=querystring)
print(response.text)