Skip to content

feat: add DHCP lease API area - #132

Merged
mikemadeja merged 1 commit into
developfrom
feature/dhcp
Oct 1, 2026
Merged

mikemadeja merged 1 commit into
developfrom
feature/dhcp

Conversation

@mikemadeja

Copy link
Copy Markdown
Owner

Summary

  • Add Get-PiHoleDhcpLease (GET /dhcp/leases) and Remove-PiHoleDhcpLease (DELETE /dhcp/leases/{ip}), completing the DHCP API area
  • Follows the existing NetworkInformation get/delete pattern - leases have no batch-delete endpoint, and a nonexistent lease naturally surfaces as a real API error rather than needing a pre-check like Remove-PiHoleGroup does

Test plan

  • Integration tests pass against a live server (5/5): list leases (empty on this DHCP-disabled test server), raw output, bad password, remove nonexistent lease, remove with bad password
  • PSScriptAnalyzer clean on the new files
  • Non-integration unit suite passes
  • README.md / docs/EXAMPLES.md regenerated (DHCP folds into the existing "Configuration & Diagnostics" category, same as NetworkInformation/History)

🤖 Generated with Claude Code

Adds Get-PiHoleDhcpLease (GET /dhcp/leases) and Remove-PiHoleDhcpLease
(DELETE /dhcp/leases/{ip}), completing the DHCP API area. Follows the
existing NetworkInformation get/delete pattern - no batch delete exists
for leases, and a nonexistent lease naturally surfaces as a real API
error rather than needing a pre-check.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@mikemadeja
mikemadeja merged commit 004a229 into develop Oct 1, 2026
3 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