Get Virtualizor

List DNS Server

Use List DNS Server API to get the DNS server information from your server.

HTTP Request

https://hostname:4085/index.php?act=pdns

Parameters

NameTypeValueDescriptionRequired
actGETpdnsThe action will add a DNS ZoneYes

Sample Code

PHP

<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

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

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $output = $admin->pdns($id,$post);
    print_r(json_encode($output));
?>

Curl

curl -k -X GET -L "https://hostname:4083/index.php?act=pdns
&api=json&apikey=your_api_key&
apipass=your_api_pass" 

Output

{
    "uid": "372",
    "act": "pdns",
    "timezone": 1,
    "timenow": "October 12, 2016, 6:22 am",
    "vpsid": "3591",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http:\/\/softaculous.com",
    "title": "DNS Management",
    "domains": {
        "3": {
            "id": "3",
            "name": "xx.xx.xx.in-addr.arpa",
            "master": null,
            "last_check": null,
            "type": "NATIVE",
            "notified_serial": null,
            "account": null,
            "virtualizor_uid": "372"
        }
    },
    "time_taken": "0.104"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list