Repository navigation
Quickstart
Akhil Reni edited this page Oct 4, 2026
·
1 revision
This page gets you from zero to a working read, write, and export in a few minutes. It assumes you've already done Installation and Configuration & Authentication.
from strobes_gql_client.client import StrobesGQLClient
from strobes_gql_client import enums
client = StrobesGQLClient(host=enums.APP_HOST, api_token=enums.API_TOKEN)
ORG = enums.ORGANIZATION_IDQueries go through execute_query(query_name, **arguments). The response is the
raw GraphQL envelope — your data is under ["data"][<graphqlFieldName>].
resp = client.execute_query("all_assets", organization_id=ORG)
assets = resp["data"]["allAssets"]["objects"]
print(f"{len(assets)} assets")
for a in assets[:5]:
print(f"- {a['name']} (type={a['type']}, risk={a['risk_score']})")Almost every list endpoint accepts a search_query written in the
Search Query Language:
resp = client.execute_query(
"all_bugs",
organization_id=ORG,
search_query="severity = 5 and state = 1", # critical + open
)
for bug in resp["data"]["allBugs"]["objects"]:
print(bug["title"], bug["cvss"])Mutations go through execute_mutation(mutation_name, **arguments). Unlike
queries, this returns the mutation's payload directly (no ["data"]
wrapper).
result = client.execute_mutation(
"create_asset",
organization_id=ORG,
name="Production Web App",
type=1, # 1 = Web
url="https://app.example.com",
sensitivity=3, # High
exposed=2, # Public
tags=["production", "web"],
)
print("Created:", result)For large organizations, don't paginate by hand — kick off a server-side CSV export and let the client poll until it's done:
report = client.export_bugs_and_wait(ORG) # or export_assets_and_wait(ORG)
print("Download URL:", report["file"])See Exporting Data for the full story.
from strobes_gql_client.client import StrobesGQLClient
from strobes_gql_client import enums
client = StrobesGQLClient(host=enums.APP_HOST, api_token=enums.API_TOKEN)
ORG = enums.ORGANIZATION_ID
# Read
resp = client.execute_query(
"all_assets", organization_id=ORG, search_query="type = 1"
)
web_assets = resp["data"]["allAssets"]["objects"]
print(f"{len(web_assets)} web assets")
# Write
client.execute_mutation(
"create_asset",
organization_id=ORG,
name="API Gateway",
type=1,
url="https://api.example.com",
sensitivity=4,
exposed=2,
)
# Export
report = client.export_assets_and_wait(ORG, search_query="type = 1")
print("CSV:", report["file"])- Core Concepts — understand queries vs. mutations, response shapes, pagination, and error handling. Highly recommended before you build anything real.
- Search Query Language — master the filter syntax.
- Topic guides: Assets, Findings, Engagements, Comments, Reports, Exporting Data.
Getting started
Guides
- Search Query Language
- Assets
- Findings
- Engagements
- Comments
- Vault Documents
- Reports
- Exporting Data
- Connectors & Scan Logs
- File Uploads & CSV Imports
Reference