getData
Description:
Method returns information about domain from DNS server.


Additional parameters
fqdn - full domain name (domain in national zones need to be passed in punycode).


Call example:


// for illustration purposes input_data is presented in uncoded form
https://api.beget.de/api/dns/getData?login=userlogin&
passwd=password&input_format=json&output_format=json&
input_data={"fqdn":"beget.de"} 

// correct call example, input_data is coded with urlencode
https://api.beget.de/api/dns/getData?login=userlogin&
passwd=password&input_format=json&output_format=json&
input_data=%7B%22fqdn%22%3A%22beget.de%22%7D+



Response example:


[
"is_under_control": 1, // domain is under BeGet administration (0 - no / 1 - yes)
"is_beget_dns": 1,     // domain is on BeGet DNS servers (0 - no / 1 - yes)
"is_subdomain": 0,     // is the domain a subdomain (0 - no / 1 - yes)
"fqdn": "beget.de",    // passed domain name
"records": {           // currently used DNS records
    "DNS": [
        {
           "value": "ns1.beget.de",
            "priority": 10
      },
      {
           "value": "ns2.beget.de",
            "priority": 20
      }
   ],
  "DNS_IP": [
     {
           "value": null,
          "priority": 10
      },
      {
           "value": null,
          "priority": 20
      }
   ],
  "A": [
      {
           "value": "91.106.201.65",
           "priority": "0"
     }
   ],
  "MX": [
     {
           "value": "mx1.beget.de",
            "priority": "10"
        },
      {
           "value": "mx2.beget.de",
            "priority": "20"
        }
   ],
  "TXT": [
        {
           "value": "",
            "priority": 0
       }
   ]
},
 // type of currently used settings:
 // 1 - A, MX, TXT records used; 
 // 2 - NS records used (for subdomains); 
 // 3 - CNAME records used (for subdomains).
"set_type": 1     
]        




changeRecords
Description:
Method changes DNS records for given domain.


Additional parameters
fqdn - full domain name (domains in national languages need to be passed in punycode).
records - array, containing DNS records.

Pass one of the parameter groups in the parameter records (in the example parameters are passed via JSON):

1. A, MX, TXT records:

 {
      "A":[
          {
          "priority":10,
          "value":"127.0.0.1"
          }
    ],
      "MX":[
         {
          "priority":10,
          "value":"mx1.beget.de"
       },
          {
          "priority":20,
          "value":"mx2.beget.de"
       }
    ],
      "TXT":[
        {
          "priority":10,
          "value":"TXT record"
         }
    ]
    }

You can pass up to 10 records of each type. The record priority must be indicated correctly.

2. NS records (for subdomains):

 {
      "NS":[
         {
          "priority":10,
          "value":"ns1.beget.de"
       },
          {
          "priority":20,
          "value":"ns2.beget.de"
       }
    ]
    }

You can pass up to 10 records of each type. The record priority must be indicated correctly.

3. CNAME records (for subdomains):
  
       {
       "CNAME":[
          {
          "priority":10,
          "value":"domain.de"
          }
    ]
    }

Only one CNAME record can be passed.

4. DNS records (for domains under BeGet administration):
    
    {
      "DNS":[
        {
          "priority":10,
          "value":"ns1.domain.de"
          },
          {
          "priority":20,
          "value":"ns2.domain.de"
          }
    ],
      "DNS_IP":[
         {
          "priority":10,
          "value":"127.0.0.1"
          },
          {
          "priority":20,
          "value":"192.168.1.2"
        }
    ]
    }

Up to 4 records can be passed. If DNS servers are not your own (i.e. are not located on one of the subdomains of the main domain), the section DNS_IP can be left out.


Call example:


// for illustration purposes input_data is presented in uncoded form
https://api.beget.de/api/dns/changeRecords?login=userlogin&
passwd=password&input_format=json&output_format=json&
input_data={"fqdn":"beget.de","records":{"A":[{
"priority":10,"value":"127.0.0.1"}],
"MX":[{"priority":10,"value":"mx1.beget.de"},
{"priority":20,"value":"mx2.beget.de"}],
"TXT":[{"priority":10,"value":"TXT record"}]}}

// correct call example, input_data is coded with urlencode
https://api.beget.de/api/dns/changeRecords?login=userlogin&
passwd=password&input_format=json&output_format=json&
input_data=%7B%22fqdn%22%3A%22beget.de%22%2C%22records
%22%3A%7B%22A%22%3A%5B%7B%22priority%22%3A10%2C%22value
%22%3A%22127.0.0.1%22%7D%5D%2C%22MX%22%3A%5B%7B%22
priority%22%3A10%2Cvalue%22%3A%22mx1.beget.de%22%7D%2C%7B%22
priority%22%3A20%2C%22value%22%3A%22mx2.beget.de
%22%7D%5D%2C%22TXT%22%3A%5B%7B%22priority%22%3A10%2C%22
value%22%3A%22TXT+record%22%7D%5D%7D%7D



Response example:


 true   



Returns property of successful or unsuccessful execution.