Get Virtualizor

Delete Zone

Use the Delete Zone API to delete the zone record from the PDNS server. This will delete both the records and domains associated with the record from the PowerDNS servers database. The API response will contain "done" as "true" after successful removal of the zone.

HTTP Request



actGETdomainsThe action will be return the result after deleting the specified zoneYes
pdnsidPOSTIntThe zone of the respective pdns server that needs to be deletedYes
delPOSTIntThe ID of the zone that needs to be deleted. For deleting multiple zones pass in the IDs as comma separated valuesYes

Sample Code



    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

    $admin = new Virtualizor_Admin_API($ip, $key, $pass);

    $page= 1;
    $reslen = 1;
    $post['pdnsid'] = 1;
    $post['del'] = 15;

    $output = $admin->domains($page, $reslen, $post);




    "title": "DNS Zones",
    "done": "true",
    "domains": "null",
    "timenow": "1480920783",
    "time_taken": "0.115"
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list