Description
PowerDNS API bindings for api/v1
Description
PowerDNS API allows programmatic manipulation of zones and other metadata. This library is a thin wrapper, exposing most of the idiosyncracies directly.
Users are advised to refer to the PowerDNS documentation and its source code for the exact semantics.
All exposed API endpoints are provided.
import qualified PowerDNS.Client as P
import Network.HTTP.Client (newManager, defaultManagerSettings)
import Servant.Client (runClientM, mkClientEnv, parseBarseUrl)
main :: IO
main = do
uri <- parseBaseUrl "http://localhost:8081"
mgr <- newManager defaultManagerSettings
let env = P.applyXApiKey "secret" (mkClientEnv mgr uri)
Right r <- runClientM (P.statistics "localhost" Nothing Nothing) env)
traverse_ print r