pi-hole/api

Settings Manipulation - Reading

AzureMarker opened this issue · 2 comments

This is a sub-issue from #7 focusing on reading settings.

Settings should be exposed in some RESTful fashion, such as /admin/api/setting/upstream_dns. This issue only focuses on reading the setting (HTTP GET).

The settings are stored in /etc/pihole/setupVars.conf by default (see PiholeFile::SetupVars). There is already a method called read_setup_vars in setup_vars.rs which can read data from the file, but it might need to be changed into a more structured form. This form should easily be able to be extended for writing settings (see #29).

There should be an endpoint for web interface specific settings, such as language. pi-hole/web#105

The web interface specific settings will be handled in a separate issue, since web distinguishes it from the main settings issues.