Symptoms

As a Provider I want to manage DNS records of customers' domains using command line tools, not via OA Control Panel.

It may be needed in case of bulk DNS records creating/updating.

Resolution

Use the following OA OpenAPI methods to manage DNS records:

E.g. use the following XML request to create new DNS records in customer's domain:

<?xml version='1.0'?>
<methodCall>
 <methodName>pem.createDNSRecord</methodName>
  <params>
   <param>
    <value>
     <struct>
      <member>
       <name>data</name>
       <value><string>test</string></value>
      </member>
      <member>
       <name>type</name>
       <value><string>txt</string></value>
      </member>
      <member>
      <name>host</name>
      <value><string>Host part of the DNS Record</string></value>
     </member>
     <member>
      <name>domain_name</name>
      <value><string>test.tld</string></value>
     </member>
    </struct>
   </value>
  </param>
 </params>
</methodCall>

Refer to the Odin Knowledgebase article #111822 How to send OpenAPI request to POA for instructions how to use OA OpenAPI.

Note: this solution will not work for domains hosted in Plesk as all DNS operations have to be done from Plesk side. OA API will create DNS records in OA database only. Zones are fetched from Plesk automatically after TTLs expires or on Plesk request.

Question:

Is there an API method that allows to update TTL value for specific DNS record type (For example A record) for domain.

Answer:

No, there is a feature request with id PFR-2359 to implement API method to update TTL value for specific DNS record type.

Internal content