"error":{"key":"bad_request"

I migrated my Pi-hole from a Raspberry Pi to a pre-built Pi-hole instance using
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/pihole.sh)"
The migration itself went smoothly. Now I have noticed that my API calls no longer work. I cannot say for sure whether this is related to the migration from the old Pi-hole version to the new version in a Proxmox container.

For example, these calls:
http://IPADDRESS/admin/api.php?disable=300&auth=
http://IPADDRESS/admin/api.php?status

In the admin web interface, disabling works without a password when you click the button.

I suspect that something has changed in Pi-hole, because the status call now returns this error message:
{"error":{"key":"bad_request","message":"Bad request","hint":"The API is hosted at pi.hole/api, not pi.hole/admin/api"},"took":0.00012803077697753906}

Any help is appreciated.

API has changed completely with v6 -> Pi-hole API - Pi-hole documentation

This is not an official Pi-hole installation method.

I suggest you to search for help on the correct repository:

Actually a lot of things have changed from Pi-hole v5 to Pi-hole v6.

Pi-hole v6 API was completely rewritten and you will need apps designed to work with the new version.

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