What is the right Pi-hole compatible API?

Hello!

I know that there are already some posts asking and talking about the API to interact with Pi-hole, but I'm a bit confused about this page. Is that page actually supported nowadays?

I got it working using the methods listed here.

Notes: I'm using the latest Pi-hole version (all components).

Both are applicable, but Pi-hole API 6.0 (though reasonably mature) is still to be considered WIP, as Pi-hole v6 hasn't been released yet. And naturally, you'd have to be willing to take the risk to deploy a v6 development version of Pi-hole in order to test it. :wink:

What is your current interest in using Pi-hole's API?

Thank for your reply.

You said that both are compatible with current latest Pi-hole version. But I was talking about Pi-hole v5.x.x, not v6. Maybe I explained myself in a wrong way, or I misunderstood you.

I tried to use it, but couldn't find the right way to send correct GET requests using it.
Example: http(s):<my-pihole-domain.xxx>/admin/api/stats/summary&auth=<api_token>

I'm building a small project to control Pi-hole from the phone (Android), so I'm using the API to request some data and display it on the screen, as well as to control it, such as: turn on/off Pi-hole, etc.

No, I pointed out that you need to deploy a v6 development version of Pi-hole in order to test that Pi-hole API 6.0.
Both documentations are valid, each for its respective version.

If you intend to have your project work with a current v5 installation, use the current v5 API, though you should probably be aware that those API calls are to be superseeded by Pi-hole API 6.0 once Pi-hole v6 will be released.

1 Like

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