Api.php most functions do not work

I used to be able to get info from api.php and use this for graphs in Domoticz.
The api does some things but does not return much info anymore.
I have a Raspberry Pi 3+ with Buster and apache.

pihole -v
Pi-hole version is v5.14.2 (Latest: v5.14.2)
AdminLTE version is v5.18 (Latest: v5.18)
FTL version is v5.20 (Latest: v5.20)

The curl commands below are from my Ubuntu laptop. I have the same results from web browsers and from the commandline on the Raspberry Pi itself. Also when I use localhost or 127.0.0.1 on the Raspberry Pi

What works is:
jack@jv:~$ curl 'http://192.168.2.13/admin/api.php?type'
{"type":"FTL"}

Also works for version and I can disable and enable using disable=0&auth=................' and enable=0&auth=................'

summary and also nothing behind php.api just return two square brackets with nothing in between

other commands also give nothing back.

Could this be your issue? From https://pi-hole.net/blog/2022/12/21/pi-hole-ftl-v5-20-and-web-v5-18-released/#page-content

Pi-hole Web changes:

More API endpoints now require auth – as mentioned last month in this blog post

What’s Changed

  • Fix doughnutTooltip if total percentage of shown slices is less than 0.1% by @yubiuser in #2434
  • Require auth for more API endpoints by @yubiuser in #2411
  • Increase small-box footer contrast ratio by @XhmikosR in #2432

Full Changelog: v5.17...v5.18

Thanks for the link :grin:,

on that page behind the this blog post I found a link to

https://pi-hole.net/blog/2022/11/17/upcoming-changes-authentication-for-more-api-endpoints-required/#page-content

and now I have a working curl command for summary.

I did not test other commands yet but I trust these will work too.

Next is to change my Domoticz plugin.

Thanks again and a happy New Years Eve !

Jack

Glad I could help!

Domoticz plugin is fixed and my graphs are updating again :upside_down_face:

5 posts were split to a new topic: API functions not working

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