Can you please just add those features in the API:
1- Adding and Removing Domain from White- and Blacklist with an API request.
2- Display the current White- and Blacklist with API.
Thanks in advance and I hope if I could do it alon but I don’t have experience with RUST which used in Pi Hole API.
DL6ER
January 10, 2020, 7:32pm
2
We're currently working on a HTTP based API for a future Pi-hole v6.0, see
pi-hole:development
← pi-hole:new/http
opened 12:13PM - 21 Nov 19 UTC
**By submitting this pull request, I confirm the following (please check boxes, … eg [X]) _Failure to fill the template will close your PR_:**
***Please submit all pull requests against the `development` branch. Failure to do so will delay or deny your request***
- [X] I have read and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md).
- [X] I have checked that [another pull request](https://github.com/pi-hole/FTL/pulls) for this purpose does not exist.
- [X] I have considered, and confirmed that this submission will be valuable to others.
- [X] I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
- [X] I give this submission freely, and claim no ownership to its content.
**How familiar are you with the codebase?:**
## 10
---
This PR adds a fully-fledged HTTP server and JSON API to FTL.
It will replace `lighttpd` and serve both the API and the next-gen web interface.
More detail is to be added here once this feature advances further.
This API already includes the features you're requesting:
1 is available with POST
and DELETE
to the API, 2 is implemented with GET
requests to the same endpoints.
The paths will be
http://pi.hole/admin/api/dns/whitelist/exact
http://pi.hole/admin/api/dns/whitelist/regex
http://pi.hole/admin/api/dns/blacklist/exact
http://pi.hole/admin/api/dns/blacklist/regex
3 Likes
So there is a new API in version 6.0 and what I need are already exists in the old API? Am I right?
If the old API have what I need as you say can you improve me how to make a call with every method (POST, DELETE and GET).
My server is using IP domain which is this http://. .. /admin/ so I am not sure how to make the calls without knowing if I should write something in the header request or not.
DL6ER
January 10, 2020, 7:49pm
5
No, the current API does not allow editing the lists in a consistent way.
Yes I see because I didn't found that feature so I have to wait until the release of v6.0 and if so, when should it come out.
When it's ready. Probably some time after 5.0 which should enter testing soon.
stray77
January 19, 2020, 9:12am
11
This seems like a good place to suggest a simple feature.
When I whitelist a url, I'd like to be able to add a short note along with it.
same with blacklisting.
no need to reply.
DL6ER
January 19, 2020, 9:29am
12
This is already implemented forPi-hole v5.0, see
pi-hole:devel
← pi-hole:new/group-management
opened 03:48PM - 13 Dec 19 UTC
**By submitting this pull request, I confirm the following:**
- [X] I have re… ad and understood the [contributors guide](https://github.com/pi-hole/AdminLTE/blob/master/CONTRIBUTING.md), as well as this entire template.
- [X] I have made only one major change in my proposed changes.
- [X] I have commented my proposed changes within the code.
- [X] I have tested my proposed changes.
- [X] I am willing to help maintain this change if there are issues with it later.
- [X] I give this submission freely and claim no ownership.
- [X] It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1)
- [X] I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
- [X] I have Signed Off all commits. ([`git commit --signoff`](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff))
---
**What does this PR aim to accomplish?:**
Add group management for the per-client blocking
**How does this PR accomplish the above?:**
Add four new pages where users can configure
- groups,
- clients,
- domains, and
- adlists
**What documentation changes (if any) are needed to support this PR?:**
We should write a tutorial or at least some documentation. Even if I tried to make it as easy as possible to use.
This is how my dashboard looks like (I'm already on the v5.0 code):
2 Likes
stray77
January 20, 2020, 6:43pm
13
Nice.
I admit I did not check the development branch. I was just irritated I had to whitelist an adserver because the local paper put the obituary pics on it. I wanted to remember why. Seeing your screenshot, it's exactly what I had in mind for all that space next to the domain name. Good work.
DL6ER
January 20, 2020, 7:15pm
14
This is part of Pi-hole v5.0 (beta),
stray77
January 21, 2020, 11:03am
15
I just checked out the dev and web devel branches to satisfy my need. I don't mind waiting for the V5 release and I fully accept the risks.
This is what I ended up with and it allowed me to add a note to the whitelist entries.
Pi-hole Version vDev (development, v4.3.2-380-g782fec8) Web Interface Version vDev (devel, v4.3.2-359-g60b078b) FTL Version vDev (development, vDev-ecbeb95)
Thanks again, this software helps keep my family safe.
mibere
Split this topic
January 22, 2020, 8:46am
16
A post was split to a new topic: Pi-hole with VPN
Will be implemented in v5.1
pi-hole:devel
← pi-hole:new/api_add_sub_get_lists
opened 04:39PM - 26 May 20 UTC
**By submitting this pull request, I confirm the following:**
- [X] I have r… ead and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md), as well as this entire template.
- [X] I have made only one major change in my proposed changes.
- [X] I have commented my proposed changes within the code.
- [X] I have tested my proposed changes, and have included unit tests where possible.
- [X] I am willing to help maintain this change if there are issues with it later.
- [X] I give this submission freely and claim no ownership.
- [X] It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1)
- [X] I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
---
**What does this PR aim to accomplish?:**
- Fix #1297
- Finally get rid of the remaining `add.php` and use the `groups.php` routines for everything (eases maintenance).
**How does this PR accomplish the above?:**
Add API endpoints `api.php?list=black&add=domain.com` like commands where `add=domain` and `sub=domain` can be used to manage the lists. A simple `api.php?list=black` will simply list all blacklisted domains.
`list` can be `black`, `white`, `regex_white` and `regex_black`.
**What documentation changes (if any) are needed to support this PR?:**
None