Taegis Python SDK
Project description
Taegis SDK for Python
The Taegis SDK is a Python library for interfacing with the GraphQL APIs in Taegis.
Prerequisites
- Python 3.8 or higher.
Authentication
- Set
CLIENT_ID
andCLIENT_SECRET
environment variables as described in the Taegis XDR Documenation.
OR
- Login using username/password with mfa upon service creation
OR
- Device Code SSO
Installation
python -m pip install taegis-sdk-python
Using the SDK
To use the SDK, you must first import the GraphQLService
from taegis_sdk_python import GraphQLService
from pprint import pprint as pp
service = GraphQLService()
Now that you have the GraphQLService
, you can make requests and process responses for Taegis XDR Services
. The following example uses the Investigations Service
to send a query to get all available investigations
result = service.investigations.query.investigations_search(
page=1,
per_page=3,
query="WHERE deleted_at IS NOT NULL EARLIEST=-90d"
)
pp(result)
result = service.tenants.query.tenants(tenants_query=TenantsQuery(
max_results=10,
page_num=1,
))
pp(result)
results = service.events.subscription.event_query(
query="FROM process EARLIEST=-30d",
options=EventQueryOptions(
max_rows=20,
page_size=10,
skip_cache=True,
),
)
pp(results)
print()
try:
next_page = next(
iter(
{
result.next
for result in results
if result.next
}
)
)
except StopIteration:
next_page = None
if next_page:
results = service.events.subscription.event_page(page_id=next_page)
pp(results)
Getting Started Exploring the Schema
from taegis_sdk_python import GraphQLService
service = GraphQLService()
schema = service.core.get_sync_schema()
For more in depth analysis see: Exploring the Schema
For more information see the Getting Started
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
taegis_sdk_python-1.2.10.tar.gz
(163.2 kB
view details)
Built Distribution
File details
Details for the file taegis_sdk_python-1.2.10.tar.gz
.
File metadata
- Download URL: taegis_sdk_python-1.2.10.tar.gz
- Upload date:
- Size: 163.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12c541b499c20a3751a70fc460f2552a6f915d8ad4110f8face7ef9626a3df7d |
|
MD5 | 9477ba915699e21eeebc3ada3bbd6a47 |
|
BLAKE2b-256 | 5cbc5377f1a426aa3fbb97896f7cda96d57de65a3e836a2f610560aa8e446341 |
File details
Details for the file taegis_sdk_python-1.2.10-py3-none-any.whl
.
File metadata
- Download URL: taegis_sdk_python-1.2.10-py3-none-any.whl
- Upload date:
- Size: 282.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcbbc7f3e064a86ea7015cf8756971c6bf816498aaadd432ce1ea83b5294416e |
|
MD5 | 4a4bc3c81aa128b67942e6cdd64ccce0 |
|
BLAKE2b-256 | 76bd0ef42fbb99bcd2b275fa753748280e61176c52f1caa3cef746f49cae0bf2 |