Page tree
Skip to end of metadata
Go to start of metadata

To edit a DNS record:

PUT /dns_zones/:dns_zone_id/records/:record_id.xml
PUT /dns_zones/:dns_zone_id/records/:record_id.json

XML Request example

curl -i-X PUT http://onapp.test/dns_zones/:dns_zone_id/records/:record_id.xml -d "<dns_record><name>test</name><ttl>86400</ttl></dns_record>" -u user:userpass -H 'Accept: application/xml' -H 'Content-type: application/xml' 

JSON Request example

curl -i -X PUT http://onapp.test/dns_zones/:dns_zone_id/records/:record_id.json -d '{"dns_record":{"name":"TEST_NAME","ttl":"111"}}' -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json'

You can edit the following parameters for the following DNS records:

MX record:

  • name* – DNS domain set for the record
  • ttl* – time to live value
  • priority* – the mail server preference
  • hostname* – DNS hostname

SRV record:

  • name* – DNS domain set for the record
  • ttl* – time to live value
  • port* – the port on this target host of this service.
  • weight* – the proportion of traffic the server pointed to will handle.
  • priority* – the priority of the target host
  • hostname* – DNS hostname

A record:

  • name* – DNS domain set for the record
  • ttl* – time to live value
  • ip* – domain IP

CNAME record

  • name* – DNS domain set for the record
  • ttl* – time to live value
  • hostname* – DNS hostname

AAAA record

  • name* – DNS domain set for the record
  • ttl* – time to live value
  • ip* – domain IP

TXT record

  • name* – DNS domain set for the recor
  • ttl* – time to live value
  • txt* – TXT value

NS record

  • name* – DNS domain set for the record
  • ttl* – time to live value
  • hostname* – DNS hostname

SOA record

  • name* – DNS domain set for the record
  • ttl* – time to live value

XML Response example

<?xml version="1.0" encoding="UTF-8"?>
<dns_record>
<name>@</name>
<ttl type="integer">1001</ttl>
<id type="integer">2680</id>
<type>NS</type>
<hostname>ns1.worldcdn-beta-operator.doubleukay.com</hostname>
</dns_record>

You will get a 204 status response on success, and 404 if there is no DNS zone with a requested ID or you entered incorrect URL.

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels