DNS - List DNS Server


This article provides a guide for a VPS User to list DNS server info using the VPS User API.

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

HTTP Request

https://vm1.apivps.com:4083/index.php?act=pdns

Parameters

Name Type Value Description Required
act GET pdns The action will add a DNS Zone Yes

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://vm1.apivps.com: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, 2023, 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:\/\/apivps.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"
}
  • 0 Usuários acharam útil
Esta resposta lhe foi útil?

Related Articles

DNS Record - Zone Info

This article provides a guide for a VPS User to get DNS record zone info using the VPS User API....

DNS - Add DNS Server

This article provides a guide for a VPS User to add DNS server using the VPS User API. Use Add...

DNS - Delete DNS Server

This article provides a guide for a VPS User to delete DNS server using the VPS User API. Use...

DNS Record - Add DNS Record

This article provides a guide for a VPS User to add DNS record using the VPS User API. Use Add...

DNS Record - Edit DNS Record

This article provides a guide for a VPS User to edit DNS record using the VPS User API. Use Edit...