How to retrieve/add/remove the DNS zone template DNS record via XML API?

Created:

2017-05-30 13:46:20 UTC

Modified:

2017-08-16 16:44:17 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to retrieve/add/remove the DNS zone template DNS record via XML API?

Applicable to:

  • Plesk Onyx 17.5

Question

How to retrieve/add/remove the DNS zone template DNS record via XML API?

Answer

1. The following request can be used in order to retrieve all information DNS records in the template:

<packet>
 <dns>
  <get_rec>
   <filter>
   </filter>
   <template>
   </template>
  </get_rec>
 </dns>
</packet>

2. The following request can be used in order to add DNS record (NS record example):

<packet>
 <dns>
  <add_rec>
   <type>NS</type>
   <host>example.com</host>
   <value>ns.example.com</value>
  </add_rec>
 </dns>
</packet>

3. The following request can be used in order to remove DNS record (record with id 21):

<packet>
 <dns>
  <del_rec>
   <filter>
    <id>21</id>
   </filter>
   <template>
   </template>
  </del_rec>
 </dns>
</packet>

Note: If the site-id and site-alias-id parameters are omitted, the DNS record will be added to the DNS zone template.

Additional Information

Managing DNS Records

Have more questions? Submit a request
Please sign in to leave a comment.