Is there an HTTP API documentation?

I can see that PiHole has an HTTP API at http://pi.hole/admin/api.php?

Where do I find more details about the available API functions?

This is what I am trying to do:

I have a VPN server and a Pi Hole on my Raspberry PI. I have built a custom Self Service VPN portal for that my flatmates and friends can use to connect to my home network. We use it to block ads at home and when I am outside. However, I have created 3 groups:

  1. Default - block ads, malware, etc
  2. Unrestricted - nothing blocked
  3. NSFW - NSFW content blocked

By default everyone is in Default group and ads and malware alone are blocked.

However, when I am in the office I connect my office laptop to my home network via VPN (static IP assigned to my VPN user). My static VPN IP is part of NSFW and Default group, so both ads and NSFW content are blocked.

My friends have asked me if I could do that for them too. So I was thinking of modifying my VPN Self Service Portal to add a feature where a user can go in and select "block nsfw" and the the portal should talk to PiHole API to add the user's VPN IP to "NSFW" group so NSFW content are blocked for them as needed.

There is no comprehensive and up-to-date HTTP API documentation. We do have:

but it's outdated.

You need to look at the source

P.S. We are working on Pi-hole v6, which should have a new, RESTful API. To have a look at the current state: https://ftl.pi-hole.net/new/http/docs/#overview

Wow! The new API seems to have everything I've been looking for!. Is there a projection as to when it would be released?

No unfortunately not. We are working already quite a long time on this new release. But we are all volunteers and do this in our free time. There will likely be a public beta phase, but no set due date right now.

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