Created
July 20, 2021 19:19
-
-
Save marcinantkiewicz/f0148aa5e79615f3bc5f0177e26ae38e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_detects(): | |
# other parameters: for pagination: limit (max on page) and offset, and for ordering: sort. I want detections from last 5min. | |
parameters = {"filter":"last_behavior:>'now-5m'"} | |
d = detects.Detects(creds={ 'client_id': cid,'client_secret': key}) | |
response = d.QueryDetects(parameters) | |
if response: | |
if response['body']['meta']['pagination']['total'] > 0: | |
return response['body']['resources'] | |
else: | |
return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment