A Python library for Threat Stack's REST API.
- agents
- alerts
- vulnerabilities
- rulesets & rules
- servers
Install via pip:
pip install threatstack
Create a new client:
from threatstack import ThreatStack client = ThreatStack(api_key="<API_KEY>", org_id="<ORG_ID>", user_id="<USER_ID>")
List resources:
agents = client.agents.list(status='online') # iterate over results for agent in agents: print agent["id"]
Get a single resource:
agent = client.agents.get("<AGENT_ID">)
Using a date range:
alerts = client.alerts.list(status="active", start="2017-05-01", end="2017-05-31")
See full documentation and usage examples at http://threatstack-python-client.readthedocs.io/