From d94d1da445f59f0e1e98c66d1cd1ec0c6a9756c7 Mon Sep 17 00:00:00 2001 From: Mark Schouten Date: Thu, 4 Aug 2016 12:07:14 +0200 Subject: [PATCH] Implement exportzone --- includes/class/PdnsApi.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/includes/class/PdnsApi.php b/includes/class/PdnsApi.php index 8b12304..8b2a264 100644 --- a/includes/class/PdnsApi.php +++ b/includes/class/PdnsApi.php @@ -43,10 +43,20 @@ class PdnsAPI { return $api->json; } + public function exportzone($zoneid) { + $api = clone $this->http; + $api->method = 'GET'; + $api->url = "/servers/localhost/zones/$zoneid/export"; + $api->call(); + + return $api->json; + } + public function savezone($zone) { $api = clone $this->http; // We have to split up RRSets and Zoneinfo. // First, update the zone + $zonedata = $zone; unset($zonedata['id']); unset($zonedata['url']);