You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41-4Lines changed: 41 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,6 +145,32 @@ You can get the status code of a response outside of exception handling by doing
145
145
api.domain_profile('google.com').status ==200
146
146
```
147
147
148
+
IrisQL
149
+
===================
150
+
151
+
IrisQL is a query language for Iris Investigate that lets you express complex, multi-field searches in a single request. Pass the query as a raw string via the `irisql` parameter. The query must begin with `# IrisQL-1.0`.
152
+
153
+
```python
154
+
query ="""# IrisQL-1.0
155
+
DOMAIN CONTAINS "phishing"
156
+
AND
157
+
RISK_SCORE GREATER_THAN 85
158
+
"""
159
+
160
+
results = api.iris_investigate(irisql=query)
161
+
print(results["results_count"])
162
+
for domain in results:
163
+
print(domain["domain"])
164
+
```
165
+
166
+
Pagination parameters (`page_size`, `sort_by`, `position`) are supported alongside IrisQL via `**kwargs`:
When `irisql` is set, any domain or filter parameters passed alongside it are silently ignored. IrisQL uses header-based authentication (`X-Api-Key`) automatically.
173
+
148
174
Using the API Asynchronously
149
175
===================
150
176
@@ -201,6 +227,18 @@ Optionally, you can specify the desired format (html, xml, json, or list) of the
201
227
domaintools domain_search google --max_length 10 -u $TEST_USER -k $TEST_KEY -f html
202
228
```
203
229
230
+
IrisQL queries are supported via the `--irisql` flag on `iris_investigate`. The query must begin with `# IrisQL-1.0` on its own line:
query: str=typer.Option(..., "-q", "--query", help="The apex domain name to retrieve history for (e.g. domaintools.com)."),
97
+
include_fields: str=typer.Option(None, "--include-fields", help="Comma-separated list of exact field names. Only change events matching these fields appear in results. Cannot be combined with --exclude-fields. Example: ip,registrar,all_ssl"),
98
+
exclude_fields: str=typer.Option(None, "--exclude-fields", help="Comma-separated list of exact field names. Change events matching these fields are omitted. Cannot be combined with --include-fields. Example: all_web_trackers,all_ssl"),
99
+
page_size: int=typer.Option(None, "--page-size", help="Number of change events per page. Maximum is 100 (default: 100)."),
100
+
offset: int=typer.Option(None, "--offset", help="0-indexed starting point for pagination. Increment by page-size for each subsequent page."),
101
+
next: bool=typer.Option(None, "--next", help="When true, includes a next URL in the response for cursor-based pagination."),
102
+
parsed_whois: bool=typer.Option(None, "--parsed-whois", help="When true, includes the full parsed WHOIS record in the before/after objects of each change event."),
103
+
parsed_domain_rdap: bool=typer.Option(None, "--parsed-domain-rdap", help="When true, includes the full parsed Domain RDAP record in the before/after objects of each change event."),
104
+
user: str=typer.Option(None, "-u", "--user", help="Domaintools API Username."),
105
+
key: str=typer.Option(None, "-k", "--key", help="DomainTools API key"),
106
+
creds_file: str=typer.Option(
107
+
"~/.dtapi",
108
+
"-c",
109
+
"--credfile",
110
+
help="Optional file with API username and API key, one per line.",
111
+
),
112
+
rate_limit: bool=typer.Option(
113
+
False,
114
+
"-l",
115
+
"--rate-limit",
116
+
help="Rate limit API calls against the API based on per minute limits.",
117
+
),
118
+
format: str=typer.Option(
119
+
"json",
120
+
"-f",
121
+
"--format",
122
+
help="Output format in {'list', 'json', 'xml', 'html'}",
123
+
callback=DTCLICommand.validate_format_input,
124
+
),
125
+
out_file: typer.FileTextWrite=typer.Option(sys.stdout, "-o", "--out-file", help="Output file (defaults to stdout)"),
126
+
no_verify_ssl: bool=typer.Option(
127
+
False,
128
+
"--no-verify-ssl",
129
+
help="Skip verification of SSL certificate when making HTTPs API calls",
active: bool=typer.Option(None, "--active", help="The domains that are in active state"),
25
25
search_hash: str=typer.Option(None, "--search-hash", help="The search hash to use"),
26
+
irisql: str=typer.Option(
27
+
None,
28
+
"--irisql",
29
+
help="IrisQL query string (must begin with '# IrisQL-1.0'). Mutually exclusive with domain/filter params. Pagination kwargs (--page-size, --sort-by, --position) are still supported.",
0 commit comments