Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Children Display
alltrue
styleh3
pageSuperb Cloud API

PUT /dns_zones/:dns_zone_id/records/:record_id 

Edit a DNS Record

Sections:

Table of Contents
maxLevel4
minLevel2
includeResponse.*|JSON.*|XML.*

Request Parameters

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
  • serial* – zone serial number
  • primaryNs* – primary name server
  • retry* – the amount of time your secondary name servers will wait to contact the primary name server again if the last attempt failed (in seconds)
  • ttl* – time to live value
  • refresh* – the number of seconds between update requests
  • minimum* – value of negative caching (in seconds)
  • expire* – the number of seconds a server will wait before considering the data invalid if it cannot reach the primary name server
  • hostmaster * – a hostmaster email address

Response Parameters

Info

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.

 

JSON Request example

Code Block
languagebash
themeRDark
 curl -i -X PUT https://mycp.superb.net/api/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'

XML Request example

Code Block
languagebash
themeRDark
 curl -i-X PUT https://mycp.superb.net/api/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'