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

API Essentials

API Key Generation

Autoscaling

Backups

Credit

DNS

Firewall Rules

Flex Cloud VM Control

Getting Started with Superb Flex Cloud

IP Addresses

Logs

Network Interfaces

Recipes

SSH Keys

Templates

Test Route

Troubleshooting API Issues

Viewing Activity Logs

Virtual Server Operating Systems

Virtual Servers

VS Disks

PUT /dns_zones/:dns_zone_id/records/:record_id 

Edit a DNS Record

Sections:

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

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

 curl -i -X PUT <api_url>/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

 curl -i-X PUT <api_url>/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'

 

 

  • No labels