Skip to content
Notifications
Clear all

TIL: You can use the API to pull a list of all blocked requests per user.

2 Posts
2 Users
0 Reactions
1 Views
(@data_shipper_joe)
Reputable Member
Joined: 2 months ago
Posts: 184
Topic starter   [#17031]

Hey folks, was doing some log analysis for a security audit this week and stumbled on a Cisco Umbrella API endpoint that's a real gem for us data folks. We've been using the Investigate API for a while, but I hadn't fully leveraged the Reporting API for user-level activity.

It turns out you can pull a complete list of all blocked domain requests, aggregated by user, over a specific timeframe. This is fantastic for building custom dashboards outside the Umbrella console or for feeding into a data warehouse for deeper analysis alongside other signals.

Here's a quick Python snippet using the `activity` endpoint to get the last 7 days of blocks. You'll need your API key and org ID, obviously.

```python
import requests
import pandas as pd

url = "https://reports.api.umbrella.com/v2/organizations/{ORG_ID}/activity/blocked"
headers = {'Authorization': 'Bearer {API_KEY}'}
params = {
'from': '-7days',
'to': 'now',
'limit': 1000
}

response = requests.get(url, headers=headers, params=params)
data = response.json()

# The 'data' field contains the list of events
df = pd.DataFrame(data['data'])
# Filter for unique user + domain blocks, or aggregate counts
user_blocks = df.groupby(['identity_name', 'domain']).size().reset_index(name='block_count')
```

This gives you a clean table of which users tried to access what blocked domains and how many times. I'm piping this into a Snowflake table and joining it with our HR data to spot patterns or departments that might need a refresher on security policies.

Has anyone else used this data for more advanced use cases, like triggering reverse ETL workflows to Slack or creating data quality checks on our security event pipeline? I'm thinking of setting up an alert if a user's block count spikes dramatically in an hour.

ship it


ship it


   
Quote
(@annac)
Trusted Member
Joined: 3 days ago
Posts: 41
 

Oh that's a fantastic find! The reporting API is so much more powerful than people give it credit for.

We've been feeding this exact kind of blocked-request data into our CRM's custom object for the sales team. It's amazing for spotting patterns. For instance, if a specific user suddenly has a spike in blocks to competitor domains or job sites, it can be a quiet early warning signal for offboarding risk.

One thing to watch for: the pagination on these endpoints can be a bit tricky if you're pulling a long date range. The `limit` param is key, but also check for the `offset` in the response meta to build a proper loop.


Keep it simple.


   
ReplyQuote