Use Cases
Here you will find examples of common tasks using the APIs in various languages.
Asset Tagging
By defining the CIDR range you need to tag on line 23 and a tag to apply on line 24, this script will go through all of your organizations assets and tag them.
|
|
Assets in Investigations
Given a time range (defined on line 21 and 22), find all assets that were involved in an investigation during that period.
|
|
Email High & Critical Alerts
Given a look back period (line 46), find all alerts that were above the .8
severity and send an email with their name, resolution, type, timestamp and description.
|
|
Events API
This is a example for building a connector to the Taegis Events API service. Actual implementation will very upon your events use case.
Modify the QUERY_STR
as you would in the Taegis Advanced Search box. This implementation will run until the maxRows is reached or the amount of events, whichever is lower.
Modify your result sets:
PAGE_SIZE
max is 1000
MAX_ROWS
max is 100000
Setup:
pip install gql oauthlib requests_oauthlib
|
|
Example Output:
Page: 1
# of result sets: 2
persistence 6
process 10
Page: 2
Page Id: <query id>:1
# of result sets: 1
process 10
Page: 3
Page Id: <query id>:2
# of result sets: 1
process 10
Page: 4
Page Id: <query id>:3
# of result sets: 1
process 10
Page: 5
Page Id: <query id>:4
# of result sets: 1
process 9
Result totals:
persistence 6
process 49
Find assets by tag
If you want to find all assets that have been tagged, here is an example.
|
|
Jupyter Notebooks & Taegis APIs
This is an example notebook utilizing the events API and Jupyter notebooks to pull data into pandas for manipulation.
Actual implementation will vary upon your events use case.
Setup:
pip install gql oauthlib requests_oauthlib
|
|
Example Output:
Page: 1
# of result sets: 2
persistence 6
process 10
Page: 2
Page Id: <query id>:1
# of result sets: 1
process 10
Page: 3
Page Id: <query id>:2
# of result sets: 1
process 10
Page: 4
Page Id: <query id>:3
# of result sets: 1
process 10
Page: 5
Page Id: <query id>:4
# of result sets: 1
process 9
Result totals:
persistence 6
process 49
Webhook Receiver (Javascript)
Using our orchestration and playbook systems, you can send alerts to a webhook receiver you run. For example this could be an AWS Lambda. Here is an example server.
This webhook receiver will:
- Listen for incoming alerts being sent
- Once an alert is received it will go fetch additional information about it for you to pass on to other downstream systems.
|
|