Open zimjjan opened 3 years ago
api_db.php
uses the long-term database instead of the data directly from memory (as api.php
) does.
The former has a hard-coded limit of ten clients
https://github.com/pi-hole/AdminLTE/blob/1521dfe3f46eb7bfd87a0644a1fadcf5bfd0f7f9/api_db.php#L182
You could get the information via SQL directly from the database. In v6.0 Pi-hole will get a completely new API, which might allow (@DL6ER ?) querying any number of top clients from the long-term database as well.
A quick look at the code says: Yes, this is already supported in the v6.0 code:
Please note that the linked documentation is still lacking somewhat behind the development and will be soon replaced by a documentation inbuilt into FTL (this has the benefit of being always correct for the version you have at hand).
This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.
Versions
Platform
Expected behavior
Calling
api_db.php?topClients=25
should return 25 records.Actual behavior / bug
Always returns 10.
(In addition, aggregation is done in php, so there is not even a performance advantage in doing so.)
Steps to reproduce
Call API as mentioned above.