Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Error: GET /queries Parameter Should Be length, Not n #2403

Open
sbarbett opened this issue Mar 31, 2025 · 1 comment
Open

Comments

@sbarbett
Copy link

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:

  1. Open the official Pi-hole API documentation.
  2. Navigate to the "GET /queries" endpoint.
  3. Note that the parameter is documented as n.
  4. Attempt to use n in a client, and observe that the endpoint requires the parameter to be length.

Screenshots

Image

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.

@DL6ER
Copy link
Member

DL6ER commented Apr 1, 2025

Ah, yes, sorry. It is correct in the API request description

Image

but wrong in the text for humans. Fixed by #2407

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants