DNS Record - Zone Info


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

Use Zone Info API to get all available zones created on VPS of your server.

HTTP Request

https://vm1.apivps.com:4083/index.php?act=managezone&domainid=DID

Parameters

Name Type Value Description Required
act GET managezone The action which will return data belonging to a particular page Yes
domainid POST int Provide domain ID of which you want the information. Yes

Sample Code

PHP

<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');
    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'host_ip';

    $v = new Virtualizor_Enduser_API($ip, $key, $pass);
	
    $did = 4; //domain id
    $vps = $v->managezone($did);
	
    print_r(json_encode($vps));
?>

Curl

curl -k -L "https://vm1.apivps.com:4083/index.php?act=managezone&domainid=DID&api=json&apikey=your_api_key&apipass=your_api_pass"

Output

{
   "uid":"1",
   "act":"managezone",
   "timezone":0,
   "timenow":"July 26, 2023, 12:26 pm",
   "vpsid":"7",
   "username":"abc@abc.com",
   "user_type":"2",
   "preferences":{
      "fname":"joe",
      "lname":"doe",
      "theme":"default",
      "language":"english",
      "timezone":0
   },
   "url":"index.php?",
   "rdns":{
      "pdnsid":"1"
   },
   "pdns":{
      "pdnsid":"1"
   },
   "title":"APIVPS",
   "domain":{
      "4":{
         "id":"4",
         "name":"myzone",
         "master":null,
         "last_check":null,
         "type":"MASTER",
         "notified_serial":null,
         "account":null,
         "virtualizor_uid":"1"
      }
   },
   "domains":{
      "3":{
         "id":"3",
         "name":"testzone",
         "master":null,
         "last_check":null,
         "type":"MASTER",
         "notified_serial":null,
         "account":null,
         "virtualizor_uid":"1"
      },
      "4":{
         "id":"4",
         "name":"myzone",
         "master":null,
         "last_check":null,
         "type":"MASTER",
         "notified_serial":null,
         "account":null,
         "virtualizor_uid":"1"
      }
   },
   "records":{
      "16":{
         "id":"16",
         "domain_id":"4",
         "name":"test.myzone",
         "type":"A",
         "content":"xx.xx.xx.xx",
         "ttl":"6400",
         "prio":"1",
         "change_date":"1564034723",
         "disabled":"0",
         "ordername":null,
         "auth":"1"
      }
   },
   "manage_type":[
      "A",
      "CNAME",
      "MX",
      "NS",
      "AAAA",
      "TXT"
   ],
   "domainid":4,
   "time_taken":"0.074"
}
  • vps api, vps guide, vps guides, dns records, dns zone editor
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

DNS - List DNS Server

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

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...