API Documentation?

I have been trying to find documentation for the Pi-hole web API. I have seen this FAQ post documenting the API however it doesn't look like it documents any blacklist/whitelist editing functionality.

I have also seen this post which suggests a new RESTful API that does include blacklist/whitelist editing, however the post also says that the new API is under development, and I am not sure if it is still under development or if it has been released.

Does anyone know the Web API documentation for Pi-Hole version 5.3.1, whether it be one of the above or something different?

The new RESTful style API will be released with Pi-hole 6 at some stage.

The most reliable source for the current state is probably the api.php code on GitHub.

That said, you should be able to add and delete domains by something like:
api.php?list={type}&{action}={domain}&auth={token}
where {action} could be add or sub in order to add or remove a domain from a list of a given [type} (see also API / Blacklist-Whitelist / Einträge per API (de-)aktivieren).

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.