Skip to content

feat: add Get-PiHoleApiEndpoint, completing API coverage - #148

Merged
mikemadeja merged 2 commits into
developfrom
feature/api-endpoints-and-exports
Oct 24, 2026
Merged

mikemadeja merged 2 commits into
developfrom
feature/api-endpoints-and-exports

Conversation

@mikemadeja

@mikemadeja mikemadeja commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Adds Get-PiHoleApiEndpoint, which wraps GET /api/endpoints. This completes API coverage, and it's the new feature for the upcoming v1.2.0 minor release.

Changes

  • New Get-PiHoleApiEndpoint returns one object per endpoint (Method, Uri, Parameters), e.g. ... | Where-Object Method -eq 'DELETE'
  • Exported from PiHoleShell.psm1 and PiHoleShell.psd1 (the manifest keeps its UTF-16 encoding)
  • README command reference and tools/Update-ExampleOutput.ps1 entries
  • Integration tests in tests/FTLInformation/Get-PiHoleApiEndpoint.Integration.Tests.ps1

Deliberately not wrapped

  • GET /docs: serves the HTML docs page, which the spec says is for browsers only
  • POST /action/flush/arp: deprecated alias of /action/flush/network (Invoke-PiHoleFlushNetwork)

Testing

  • New integration tests (4) and module tests (6) pass against the dev server
  • PSScriptAnalyzer clean
  • docs/EXAMPLES.md regenerated from the dev server; the only new section is Get-PiHoleApiEndpoint, and the rest of the diff is refreshed live output

🤖 Generated with Claude Code

mikemadeja and others added 2 commits October 24, 2026 08:52
Wraps GET /api/endpoints and returns one object per method and URI
(Method, Uri, Parameters) so the list can be filtered with Where-Object.
This completes API coverage: GET /docs only serves the browser HTML docs
and the deprecated /action/flush/arp alias is covered by
Invoke-PiHoleFlushNetwork, so both are deliberately left unwrapped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@mikemadeja
mikemadeja merged commit ceabe24 into develop Oct 24, 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