Skip to content

feat: add Get-PiHoleStatsQuerySuggestions - #87

Merged
mikemadeja merged 2 commits into
mainfrom
develop
Sep 19, 2026
Merged

mikemadeja merged 2 commits into
mainfrom
develop

Conversation

@mikemadeja

Copy link
Copy Markdown
Owner

Summary

Adds Get-PiHoleStatsQuerySuggestions to the Metrics folder for GET /queries/suggestions. Returns suggested filter values seen in recent queries — domain, client IP, client name, upstream, query type, status, reply, and DNSSEC status — useful for building filters for the queries endpoint. Follows the module's standard pattern (try/catch/finally with session cleanup, RawOutput switch, [System.URI] + mandatory [string]$Password params), is registered in the module's export list, and the README command reference has been regenerated to include it.

Test plan

  • Ran the function directly against a real Pi-hole v6 server — returns real suggested values
  • tests/Get-PiHoleStatsQuerySuggestions.Integration.Tests.ps1 — all 3 tests pass against the real server
  • Invoke-ScriptAnalyzer -Path .\PiHoleShell -Recurse — no findings
  • Full Invoke-Pester -Path .\tests run — 11 passed, only the pre-existing unrelated Set-PiHoleDnsBlocking failure remains

🤖 Generated with Claude Code

mikemadeja and others added 2 commits September 18, 2026 23:07
Adds a Metrics function for GET /queries/suggestions, which returns
suggested filter values (domain, client IP/name, upstream, query
type, status, reply, DNSSEC status) seen in recent queries - useful
for building filters for the /queries endpoint. Includes an
integration test verified against a real Pi-hole v6 server, and
regenerates the README command reference to include it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
feat: add Get-PiHoleStatsQuerySuggestions
@mikemadeja
mikemadeja merged commit 66715b6 into main Sep 19, 2026
4 checks passed
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