Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Query Syntax

fsPulse provides a flexible, SQL-like query language for exploring scan results. This language supports filtering, custom column selection, ordering, and limiting the number of results.


Query Structure

Each query begins with one of the five supported domains:

  • roots
  • scans
  • items
  • versions
  • alerts

You can then add any of the following optional clauses:

DOMAIN [WHERE ...] [SHOW ...] [ORDER BY ...] [LIMIT ...] [OFFSET ...]

Column Availability

Each domain has a set of available columns. Columns marked as default are shown when no SHOW clause is specified.

roots Domain

ColumnTypeDefault
root_idIntegerYes
root_pathPathYes

scans Domain

ColumnTypeDefaultDescription
scan_idIntegerYesUnique scan identifier
root_idIntegerYesRoot directory identifier
schedule_idIntegerYesSchedule identifier (null for manual scans)
started_atDateYesTimestamp when scan started
ended_atDateYesTimestamp when scan ended (null if incomplete)
was_restartedBooleanYesTrue if scan was resumed after restart
scan_stateScan State EnumNoState of the scan
is_hashBooleanYesHash new or changed files
hash_allBooleanNoHash all items including unchanged
is_valBooleanYesValidate new or changed files
file_countIntegerYesCount of files found in the scan
folder_countIntegerYesCount of directories found in the scan
total_sizeIntegerYesTotal size in bytes of all files
alert_countIntegerYesNumber of alerts created during the scan
add_countIntegerYesNumber of items added in the scan
modify_countIntegerYesNumber of items modified in the scan
delete_countIntegerYesNumber of items deleted in the scan
val_unknown_countIntegerNoFiles with unknown validation state
val_valid_countIntegerNoFiles with valid validation state
val_invalid_countIntegerNoFiles with invalid validation state
val_no_validator_countIntegerNoFiles with no available validator
hash_unknown_countIntegerNoFiles with unknown hash state
hash_baseline_countIntegerNoFiles with baseline hash state
hash_suspect_countIntegerNoFiles with suspect hash state
errorStringNoError message if scan failed

items Domain

The items domain queries each item’s latest version — the most recent known state. Identity columns come from the items table; state columns come from the item’s current version.

ColumnTypeDefaultDescription
item_idIntegerYesUnique item identifier
root_idIntegerYesRoot directory identifier
item_pathPathYesFull path of the item
item_namePathNoFilename or directory name (last segment)
item_typeItem Type EnumYesFile, Directory, Symlink, or Unknown
version_idIntegerNoCurrent version identifier
first_scan_idIntegerNoScan where current version first appeared
last_scan_idIntegerYesLast scan confirming current state
is_deletedBooleanYesTrue if item is currently deleted
accessAccess StatusNoAccess state (NoError, MetaError, ReadError)
mod_dateDateYesLast modification date
sizeIntegerNoFile size in bytes
last_val_scanIntegerNoLast scan that evaluated validation (files only; null for folders)
val_stateValidation StatusNoValidation state (files only; null for folders)
val_errorStringNoValidation error message (files only; null for folders)
last_hash_scanIntegerNoLast scan that evaluated the hash (files only; null for folders)
file_hashStringNoSHA-256 content hash (files only; null for folders)
hash_stateHash StateNoHash integrity state (files only; null for folders)

versions Domain

The versions domain queries individual item version rows — each representing a distinct state of an item over a temporal range. Use this domain to explore item history and state changes.

ColumnTypeDefaultDescription
version_idIntegerYesUnique version identifier
item_idIntegerYesItem this version belongs to
root_idIntegerYesRoot directory identifier
item_pathPathNoFull path of the item
item_namePathNoFilename or directory name (last segment)
item_typeItem Type EnumYesFile, Directory, Symlink, or Unknown
first_scan_idIntegerYesScan where this version was first observed
last_scan_idIntegerYesLast scan confirming this version’s state
is_deletedBooleanYesTrue if item was deleted in this version
accessAccess StatusNoAccess state
mod_dateDateNoLast modification date
sizeIntegerNoFile size in bytes
last_val_scanIntegerNoLast scan that evaluated validation (files only; null for folders)
val_stateValidation StatusNoValidation state (files only; null for folders)
val_errorStringNoValidation error message (files only; null for folders)
last_hash_scanIntegerNoLast scan that evaluated the hash (files only; null for folders)
file_hashStringNoSHA-256 content hash (files only; null for folders)
hash_stateHash StateNoHash integrity state (files only; null for folders)
add_countIntegerNoDescendant items added (folders only; null for files)
modify_countIntegerNoDescendant items modified (folders only; null for files)
delete_countIntegerNoDescendant items deleted (folders only; null for files)
unchanged_countIntegerNoDescendant items unchanged (folders only; null for files)
val_unknown_countIntegerNoDescendant files with unknown validation (folders only)
val_valid_countIntegerNoDescendant files with valid validation (folders only)
val_invalid_countIntegerNoDescendant files with invalid validation (folders only)
val_no_validator_countIntegerNoDescendant files with no validator (folders only)
hash_unknown_countIntegerNoDescendant files with unknown hash state (folders only)
hash_baseline_countIntegerNoDescendant files with baseline hash state (folders only)
hash_suspect_countIntegerNoDescendant files with suspect hash state (folders only)

alerts Domain

ColumnTypeDefaultDescription
alert_idIntegerNoUnique alert identifier
alert_typeAlert Type EnumYesType of alert
alert_statusAlert Status EnumYesCurrent status (Open, Flagged, Dismissed)
root_idIntegerNoRoot directory identifier
scan_idIntegerNoScan that generated the alert
item_idIntegerNoItem the alert is about
item_pathPathYesPath of the affected item
created_atDateYesWhen the alert was created
updated_atDateNoWhen the alert status was last changed
prev_hash_scanIntegerNoPrevious hash scan (for suspect hash)
hash_oldStringNoPrevious hash value
hash_newStringNoNew hash value
val_errorStringYesValidation error message

The WHERE Clause

The WHERE clause filters results using one or more filters. Each filter has the structure:

column_name:(value1, value2, ...)

Values must match the column’s type. You can use individual values, ranges (when supported), or a comma-separated combination.

TypeExamplesNotes
Integer5, 1..5, 3, 5, 7..9, > 1024, < 10, null, not nullSupports ranges, comparators, and nullability. Ranges are inclusive.
Date2024-01-01, 2024-01-01..2024-06-30, null, not nullUse YYYY-MM-DD. Ranges are inclusive.
Booleantrue, false, T, F, null, not nullUnquoted.
String'example', 'error: missing EOF', null, not nullQuoted strings.
Path'photos/reports', 'file.txt'Must be quoted. Null values are not supported.
Validation StatusV, I, N, U, null, not nullValid, Invalid, No Validator, Unknown. Null for folders. Unquoted.
Hash StateV, S, U, null, not nullValid, Suspect, Unknown. Null for folders. Unquoted.
Item Type EnumF, D, S, UFile, Directory, Symlink, Unknown. Unquoted.
Alert Type EnumH, I, ASuspect Hash, Invalid Item, Access Denied. Unquoted.
Alert Status EnumO, F, DOpen, Flagged, Dismissed. Unquoted.
Scan State EnumS, W, AF, AS, C, P, EScanning, Sweeping, Analyzing Files, Analyzing Scan, Completed, Stopped, Error. A is shorthand for AF. Unquoted.
Access StatusN, M, RNo Error, Meta Error, Read Error. Unquoted.

Combining Filters

When specifying multiple values within a single filter, the match is logically OR. When specifying multiple filters across different columns, the match is logically AND.

For example:

scans where started_at:(2025-01-01..2025-01-07, 2025-02-01..2025-02-07), is_hash:(T)

This query matches scans that:

  • Occurred in either the first week of January 2025 or the first week of February 2025
  • AND were performed with hashing enabled

The SHOW Clause

The SHOW clause controls which columns are displayed and how some of them are formatted. If omitted, a default column set is used.

You may specify:

  • A list of column names
  • The keyword default to insert the default set
  • The keyword all to show all available columns

Formatting modifiers can be applied using the @ symbol:

item_path@name, mod_date@short

Format Specifiers by Type

TypeAllowed Format Modifiers
Datefull, short, timestamp
Pathfull, relative, short, name
Validation / Hash State / Enum / Booleanfull, short
Integer / String(no formatting options)

The timestamp format modifier converts dates to UTC timestamps (seconds since Unix epoch), which is useful for programmatic processing or web applications that need to format dates in the user’s local timezone.


The ORDER BY Clause

Specifies sort order for the results:

items order by mod_date desc, item_path asc

If direction is omitted, ASC is assumed.


The LIMIT and OFFSET Clauses

LIMIT restricts the number of rows returned. OFFSET skips a number of rows before returning results.

items limit 50 offset 100

Examples

# Items whose path contains 'reports'
items where item_path:('reports')

# Large files sorted by size
items where item_type:(F), size:(> 1048576) show default, size order by size desc

# Version history for a specific item
versions where item_id:(42) order by first_scan_id

# Deleted items across all roots
items where is_deleted:(true)

# Versions with validation failures
versions where val_state:(I) show default, val_error order by first_scan_id desc

# Items with suspect hash state
items where hash_state:(S) show default, hash_state, file_hash order by item_path

# Open or flagged alerts for suspect hashes
alerts where alert_type:(H), alert_status:(O, F) order by created_at desc

# Scans with timestamps for programmatic processing
scans show scan_id, started_at@timestamp, file_count order by started_at desc limit 10

# Scans with change and alert counts
scans show scan_id, file_count, total_size, add_count, modify_count, delete_count, alert_count order by started_at desc

See also: Data Explorer · Validators · Configuration