pub trait AuthenticatedPiHoleAPI {
Show 23 methods fn get_top_items(&self, count: &Option<u32>) -> Result<TopItems, APIError>; fn get_top_clients(
        &self,
        count: &Option<u32>
    ) -> Result<TopClients, APIError>; fn get_top_clients_blocked(
        &self,
        count: Option<u32>
    ) -> Result<TopClientsBlocked, APIError>; fn get_forward_destinations(
        &self,
        unsorted: bool
    ) -> Result<ForwardDestinations, APIError>; fn get_query_types(&self) -> Result<QueryTypes, APIError>; fn get_all_queries(&self, count: u32) -> Result<Vec<Query>, APIError>; fn enable(&self) -> Result<Status, APIError>; fn disable(&self, seconds: u64) -> Result<Status, APIError>; fn get_cache_info(&self) -> Result<CacheInfo, APIError>; fn get_client_names(&self) -> Result<Vec<ClientName>, APIError>; fn get_over_time_data_clients(
        &self
    ) -> Result<HashMap<String, Vec<u64>>, APIError>; fn get_network(&self) -> Result<Network, APIError>; fn get_queries_count(&self) -> Result<u64, APIError>; fn list_add(
        &self,
        domain: &str,
        list: &str
    ) -> Result<ListModificationResponse, APIError>; fn list_remove(
        &self,
        domain: &str,
        list: &str
    ) -> Result<ListModificationResponse, APIError>; fn list_get_domains(
        &self,
        list: &str
    ) -> Result<Vec<CustomListDomainDetails>, APIError>; fn get_custom_dns_records(&self) -> Result<Vec<CustomDNSRecord>, APIError>; fn add_custom_dns_record(
        &self,
        ip: &IpAddr,
        domain: &str
    ) -> Result<ListModificationResponse, APIError>; fn delete_custom_dns_record(
        &self,
        ip: &IpAddr,
        domain: &str
    ) -> Result<ListModificationResponse, APIError>; fn get_custom_cname_records(
        &self
    ) -> Result<Vec<CustomCNAMERecord>, APIError>; fn add_custom_cname_record(
        &self,
        domain: &str,
        target_domain: &str
    ) -> Result<ListModificationResponse, APIError>; fn delete_custom_cname_record(
        &self,
        domain: &str,
        target_domain: &str
    ) -> Result<ListModificationResponse, APIError>; fn get_max_logage(&self) -> Result<f32, APIError>;
}

Required Methods

Get the top domains and ads and the number of queries for each. Limit the number of items with count.

Get the top clients and the number of queries for each. Limit the number of items with count.

Get the top clients blocked and the number of queries for each. Limit the number of items with count.

Get the percentage of queries forwarded to each target.

Get the number of queries per type.

Get all DNS query data. Limit the number of items with count.

Enable the Pi-Hole.

Disable the Pi-Hole for seconds seconds.

Get statistics about the DNS cache.

Get hostname and IP for hosts

Get queries by client over time. Maps timestamp to the number of queries by clients. Order of clients in the Vector is the same as for get_client_names

Get information about network clients.

Get the total number of queries received.

Add domains to a custom white/blacklist. Acceptable lists are: white, black, white_regex, black_regex, white_wild, black_wild, audit.

Remove domain to a custom white/blacklist. Acceptable lists are: white, black, white_regex, black_regex, white_wild, black_wild, audit.

Get a list of domains on a particular custom white/blacklist Acceptable lists are: white, black, white_regex, black_regex, white_wild, black_wild, audit.

Get a list of custom DNS records

Add a custom DNS record

Delete a custom DNS record

Get a list of custom CNAME records

Add a custom CNAME record

Delete a custom CNAME record

Get max logage

Implementors