I’m looking to pull all of my requests records out of the pi to keep in a separate database.
Currently I was setting up to use mySQL and was using node-red to initiate the pull based on a timer.
I’ve been trying to get the API to work, but I’ve run into some problems.
- I can’t filter the admin/api.php?getAllQueries route. https://discourse.pi-hole.net/t/pi-hole-api/1863 The API doc says there are “undocumented filters” but as far as I can tell from github none of these filters are exposed in the php route.This isn’t 100% blocking but it would be nice to only request records I don’t already have. GitHub Places of interest: PHP FTL
- Even if I could filter for the times I wanted I would have no way to identify duplicates. The internal system is keeping a unique ID but the API doesn’t expose it. The records themselves are not unique, over a 2 hour period I have about 10-15% “duplicate” records same [timestamp,IP,request,RequestType(IPv4/IPv6),responseType(enumeration)]
Has anyone solved these issues? Google search didn’t turn up too much.
Maybe I would have better luck trying to grab data out of the sqlite database the pi is running for itself?
Or maybe there is a log that I haven’t found that I could parse and write to my DB?
Thanks in advance for the help!
P.S. First post!