diff --git a/README.md b/README.md index e50c8356..7f782af9 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,15 @@ Using **[AdminLTE](https://almsaeedstudio.com)**, this project will create a Web From this interface, you will be able to see stats on how well your Pi-hole is performing. You will also be able to update the lists used to block ads. ![Pi-hole Web interface](http://i.imgur.com/x2iMfoc.png) -![Fully responsive](http://i.imgur.com/NyAIXm8.png) \ No newline at end of file +![Fully responsive](http://i.imgur.com/NyAIXm8.png) + +## API +A basic read-only API can be accessed at `/admin/api.php`. It returns the following JSON: +```JSON +{ + "domains_being_blocked": "136708", + "dns_queries_today": "18108", + "ads_blocked_today": "14648", + "ads_percentage_today": 80.892423238348 +} +``` diff --git a/api.php b/api.php new file mode 100644 index 00000000..6ad9845d --- /dev/null +++ b/api.php @@ -0,0 +1,3 @@ +