Skip to content

Add --query for advanced query expressions to device list - #8

Open
lawik wants to merge 1 commit into
mainfrom
advanced-query
Open

lawik wants to merge 1 commit into
mainfrom
advanced-query

Conversation

@lawik

@lawik lawik commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

nh device list -q/--query sends the web UI search bar's advanced query language as filters[advanced_query], so devices can be queried by custom health metrics (metric: against each device's latest reading), boolean expressions over the whitelisted columns, or free text. The server rejects an invalid query expression with a 422 whose parse error the CLI already surfaces.

Requires server-side support for the advanced_query filter on the device index endpoint; on older servers the filter is ignored.

nh device list -q/--query sends the web UI search bar's advanced query
language as filters[advanced_query], so devices can be queried by custom
health metrics (metric:<key> against each device's latest reading),
boolean expressions over the whitelisted columns, or free text. The
server rejects an invalid query expression with a 422 whose parse error
the CLI already surfaces.

Requires server-side support for the advanced_query filter on the
device index endpoint; on older servers the filter is ignored.
@lawik
lawik requested a review from joshk September 1, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant