Manage Local DNS through the API

Hi there, I checked the API docs from here index - powered by h5ai v0.30.0 (https://larsjung.de/h5ai/) and I don't see any option to manage the Local DNS.

It would be really awesome you could manage the Local DNS using the API so Pi-Hole could integrate with other tools and systems.

For instance, a use case:

  • As a user I would like to interact with the API so I will be able to CRUD entries in the Local DNS.
  • Example: In a Docker environment. My deployments uses dynamic configuration for the proxy (let's say Traefik), A plugin in Traefik could use the API to register a new domain in the Local DNS.

I don't see much of use case here.

Commonly, local devices would try to claim a local name during DHCP lease negotiation.
Your router's DHCP server may then register that name with its internal DNS server.

Pi-hole can be configured to request those local names by enabling Conditional Forwarding, providing dynamic local name resolution as known by your router.

What about if you don't use DHCP and use manual IP assignment?

When using Docker you don't normally define the hostname or the hostname does not match with the external domain so this feature will be really interesting.