-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support to lists #7
Comments
Unfortunatly there is no PIHole Api point to do this. The only way to do this would be writing a small php script and loading that on the server to execute the commands via the cli. Maybe we can get some pihole devs to add these points to the api. |
I looked a bit at the pihole code a bit and I see there is a method. example request: http://pi.hole:8085/admin/api.php?list=black&add=example.com&auth=here_api_key list can be: white |
Insane! Is there any online documentation about this? The API documentation seems just old and not updated anymore. I will try this methods out. Hopefully that will work fluently in the extension! |
I can see that there was also a sub method [https://github.com/pi-hole/web/issues/1297], but something probably went wrong. example request: http://pi.hole:8085/admin/api.php?list=black&sub=example.com&auth=here_api_key |
There is likely not going to be much more work done in terms of the PHP API, it was never really ideal to start with (hence not very well documented) Things will change on or around version 6.0 of Pi-hole with: pi-hole/FTL#659 But, obviously no timelines. In the meantime I'll see what I can find out about the removal of the |
Interesting idea. As if I had a moment of time, maybe I could add the missing methods, but I don't know what the development path is. I have no idea if the service in the new pihole will be through add / sub or by groups. |
Yea i saw this point in the groups, but i dont think authentification will work. As i have seen the code, you need a token which you get via the password authentification. |
I've added a few lines of code that should do the trick. We will see if it will be accepted. |
Very cool! Hope this will pass. The implementation you made suits the extension perfect. But overall the implementation now seems more logical than before. |
If you are interested in testing this feature, feel free to use this beta built here: |
@badsgahhl could you try your extension against the |
@PromoFaux Works like a charm! |
If the API allows, there might be an option to add the site to the white / black list.
The text was updated successfully, but these errors were encountered: