arcsentry query
Run an AQL or SQL query over a case's evidence and print the rows.
Subcommands
- boundsPrint the earliest and latest event time in scope.
- fieldsPrint the live fields of event types in a case's evidence.
- historyList the case's Hunt query history page by page, newest first.
- typesPrint the event types actually present in a case, optionally narrowed to named evidence.
Run an AQL or SQL query over a case's evidence and print the rows.
A query runs against exactly one evidence item, named with --evidence, so find evidence UUIDs with evidence list or --list-evidence and compare evidence items by running the same query once per evidence item. Narrow further with --event-type and the time flags, which take an ISO 8601 timestamp and refuse a time without an offset. jsonl and csv write every page as it arrives, while json and table print one page and name --cursor on stderr when more remain. --cursor continues after a previous answer and --page-number jumps to a page of the same query. Progress notices go to stderr so stdout stays parseable, and when the records of the evidence cannot be read the query exits non-zero instead of printing an empty result.
arcsentry query --case <case> [options] | Option | Description |
|---|---|
| -c, --case <case>required | Case UUID. |
| -H, --evidence <evidence> | UUID of the one evidence item the query runs against. Required to run a query; exactly one, never repeated. Only --list-evidence and --list-event-types take no evidence. |
| -L, --list-evidence | Print the case's evidence instead of running a query. Reads no records. |
| -Y, --list-event-types | Print the event types present in scope instead of running a query. |
| -a, --aql <aql> | AQL query to run, e.g. 'filter event_type == "evtx_security" | take 100'. |
| -S, --sql <sql> | SQL query to run instead of AQL. Read-only and allowlisted. |
| -e, --event-type <event-type> | Limit the query to this event type. Can be repeated. |
| -f, --format <format> | Output format: jsonl (default), json, csv, or table. Default: "jsonl". |
| -l, --limit <limit> | Rows per page. jsonl and csv write every page; json and table print one page. |
| -N, --page-number <page-number> | Jump to this page of the same query, counting from the first. Conflicts with --cursor. |
| -C, --cursor <cursor> | Continue after a previous answer, with the same flags. Rows added during a walk may or may not appear. |
| -s, --time-start <time> | Earliest event time to include, as an ISO 8601 timestamp with an offset or Z. |
| -E, --time-end <time> | Latest event time to include, as an ISO 8601 timestamp with an offset or Z. |
| -p, --param <param> | Named binding as name=value. bounds.start, bounds.end, start, and end resolve to the scope's real time bounds. Can be repeated. |
Examples
Search one evidence item for a term and write every matching row as JSON lines
arcsentry query --case 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 --evidence 8c3d1e77-9f42-4a6b-b810-2e5d47c9a013 --aql 'search_all "mimikatz"' Read the first page of the same search as a JSON envelope with its cursor
arcsentry query --case 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 --evidence 8c3d1e77-9f42-4a6b-b810-2e5d47c9a013 --aql 'search_all "mimikatz"' --format json Continue the search after the previous answer, with the same flags
arcsentry query --case 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 --evidence 8c3d1e77-9f42-4a6b-b810-2e5d47c9a013 --aql 'search_all "mimikatz"' --format json --cursor eyJ2IjoxLCJrIjoia2V5c2V0In0 Write one event type of one evidence item over the night of the intrusion to a file
arcsentry query --case 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 --evidence 8c3d1e77-9f42-4a6b-b810-2e5d47c9a013 --event-type evtx_security --time-start 2026-07-29T00:00:00Z --time-end 2026-07-29T06:00:00Z --format csv > intrusion-night.csv Subcommand reference
arcsentry query bounds
Print the earliest and latest event time in scope.
Use this to size a time window before querying, and to supply --param bounds.start / bounds.end. Both bounds are printed as UTC ISO 8601 instants, in the form --time-start and --time-end accept. A scope holding no events reports a null bound rather than a substitute time.
arcsentry query bounds --case <case> [options] | Option | Description |
|---|---|
| -c, --case <case>required | Case UUID. |
| -H, --evidence <evidence> | Limit the bounds to the evidence with this UUID; omit for all the evidence in the case. Can be repeated. |
| -f, --format <format> | Output format: json (default), jsonl, csv, or table. Default: json. |
Examples
Print the time range covered by a whole case
arcsentry query bounds --case 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 Print the time range covered by one evidence item
arcsentry query bounds --case 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 --evidence 8c3d1e77-9f42-4a6b-b810-2e5d47c9a013 Print the range across two evidence items as a table
arcsentry query bounds --case 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 --evidence 8c3d1e77-9f42-4a6b-b810-2e5d47c9a013 --evidence 1b6f0a94-77c5-4e29-9d3a-0f4b8c2e6d51 --format table Print it using the short forms of every flag
arcsentry query bounds -c 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 -H 8c3d1e77-9f42-4a6b-b810-2e5d47c9a013 -f json arcsentry query fields
Print the live fields of event types in a case's evidence.
Each event type comes back with held, which says whether any selected evidence holds it, with shares_fields_with_other_types, which says the event type shares its fields with other event types, and with fields, which lists the fields the event type carries and marks in_evidence_schema for each of them the Arcsentry field catalog describes. Omit --type for every event type the selected evidence holds, and omit --evidence for all the evidence in the case. An id the catalog does not name and no evidence holds is refused, and so is an event log family id such as evtx; name the per-channel id instead.
arcsentry query fields --case <case> [options] | Option | Description |
|---|---|
| -c, --case <case>required | Case UUID. |
| -e, --type <type> | Event type to describe, for example evtx_security; omit it for every type the selected evidence holds. Can be repeated. |
| -H, --evidence <evidence> | Limit to the evidence with this UUID; omitting it reads all the evidence in the case. Can be repeated. |
| -f, --format <format> | Output format: json (default), jsonl, csv, or table. Default: json. |
Examples
Print the live fields of Windows security events in all the evidence
arcsentry query fields --case 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 --type evtx_security Compare two event types in one evidence item, as a table
arcsentry query fields --case 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 --evidence 8c3d1e77-9f42-4a6b-b810-2e5d47c9a013 --type amcache --type prefetch --format table Print every event type that evidence holds with its fields, one row per field
arcsentry query fields --case 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 --evidence 8c3d1e77-9f42-4a6b-b810-2e5d47c9a013 --format csv Print them using the short forms of every flag
arcsentry query fields -c 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 -H 8c3d1e77-9f42-4a6b-b810-2e5d47c9a013 -e amcache -f jsonl arcsentry query history
List the case's Hunt query history page by page, newest first.
The history is the Hunt queries run in this case from the GUI editor, newest first, each with the time it ran, its query text, its language and its row count; a row count that was not recorded is left empty. A listing returns one page: the answer carries total on the first page, the number of entries in the history, and has_more, which is true while more pages remain, with the next_cursor that continues. --cursor reads that one page, and --limit sets how many entries a page carries. With --format jsonl or csv every page is read and written as it arrives, and with --format table one page is printed and the cursor that continues is named on stderr.
arcsentry query history --case <case> [options] | Option | Description |
|---|---|
| -c, --case <case>required | Case UUID. |
| -l, --limit <limit> | Entries per page. The page says whether more remain and how to continue. |
| -C, --cursor <cursor> | Read the page that starts after this position. Use the next_cursor of the previous page. |
| -f, --format <format> | Output format: json (default), jsonl, csv, or table. Default: "json". |
Examples
Print the newest page of the case's query history
arcsentry query history --case 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 Read the next page of a chosen size from the cursor the previous page named
arcsentry query history --case 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 --limit 20 --cursor WzE3NTk1MDAwMDAxMjMwMDAsImExIl0 Print one page as a table with the short forms of the flags
arcsentry query history -c 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 -f table Print every history entry, one JSON object per line
arcsentry query history --case 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 --format jsonl arcsentry query types
Print the event types actually present in a case, optionally narrowed to named evidence.
For every event type the build can produce, whether or not this case holds it, use list-event-types. Each type comes back with the number of evidence items and the number of records the case holds for it, so this also answers how much of a type is there. Repeating --evidence answers the union of exactly the evidence you name and never widens back to the case-wide answer.
arcsentry query types --case <case> [options] | Option | Description |
|---|---|
| -c, --case <case>required | Case UUID. |
| -H, --evidence <evidence> | Limit to the evidence with this UUID; every value is honoured, and omitting it reads all the evidence in the case. Can be repeated. |
| -f, --format <format> | Output format: json (default), jsonl, csv, or table. Default: json. |
Examples
Print the event types present anywhere in a case
arcsentry query types --case 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 Print the event types present in one evidence item, as a table
arcsentry query types --case 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 --evidence 8c3d1e77-9f42-4a6b-b810-2e5d47c9a013 --format table Print the union of the types across two named evidence items
arcsentry query types --case 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 --evidence 8c3d1e77-9f42-4a6b-b810-2e5d47c9a013 --evidence 1b6f0a94-77c5-4e29-9d3a-0f4b8c2e6d51 Print them using the short forms of every flag
arcsentry query types -c 4f9a2c18-3b7e-4d51-9a20-6c1f8e35b7d2 -f csv