Documentation Error: `GET /queries` Parameter Should Be `length`, Not `n`
Versions
/ # pihole -v
Core version is v6.0.6 (Latest: v6.0.6)
Web version is v6.1 (Latest: v6.1)
FTL version is v6.1 (Latest: v6.1)
Platform
- OS and version: Host system is
Debian GNU/Linux 12 (bookworm) x86_64 - Platform: Docker
Expected behavior
The documentation for the "GET /queries" endpoint should indicate that the parameter controlling the number of queries returned is length.
Actual behavior / bug
The current documentation incorrectly states that the parameter is n, even though the endpoint expects length. This discrepancy can lead to confusion when developers use the documented parameter.
Steps to reproduce
Steps to reproduce the behavior:
- Open the official Pi-hole API documentation.
- Navigate to the "GET /queries" endpoint.
- Note that the parameter is documented as
n. - Attempt to use
nin a client, and observe that the endpoint requires the parameter to belength.
Screenshots
Additional context
I maintain a small Python client for the Pi-hole API. A user recently reported this issue to me. I patched my client to accept both n (deprecated) and length for backwards compatibility. Here is a link to the commit where the patch was applied.
It would be great if the documentation could be updated to reflect the correct parameter name (length) to avoid further confusion.
Ah, yes, sorry. It is correct in the API request description
but wrong in the text for humans. Fixed by https://github.com/pi-hole/FTL/pull/2407
Should be fixed with https://github.com/pi-hole/FTL/releases/tag/v6.3