User Tools

Site Tools


api:dns:updaterecord

API : Dns Update Record

Introduction

This request will update a DNS record on a domain.

Request

URL https://api.telecomx.dk/dns/DOMAIN/record
Method PUT
Access level MANAGER or OWNER when user belongs to the customer who owns the DNS.
RESELLER if customer belongs to the reseller.
ADMIN.
Param DOMAIN String Domain name.
Body new String New points to data - depending on the type:
A: IPv4 address, ex. '213.83.176.1'
AAAA: IPv6 address, ex. '2001:db8:85a3:0:0:8a2e:370:7334'
CNAME: Hostname, ex. 'www.telecomx.dk'
SRV: name like '_service._proto.name.' and rData like 'priority weight port target.'
NS: name server hostname, ex. 'ns1.telecomx.dk'
TXT: string in quotes, ex. '“v=spf1 mx a ip4:213.83.176.0/23 a:mail.powernetmail.dk -all”'
MX: Mail exchanger, type must be postfixed with a priority number, rData is a hostname, ex. 'mail.telecomx.dk'
name String Current name. Do not include the domain name self.
type String Current record type: A, AAAA, CNAME, SRV, NS, TXT, MX.
rData String Current points to data - depending on the type:
A: IPv4 address, ex. '213.83.176.1'
AAAA: IPv6 address, ex. '2001:db8:85a3:0:0:8a2e:370:7334'
CNAME: Hostname, ex. 'www.telecomx.dk'
SRV: name like '_service._proto.name.' and rData like 'priority weight port target.'
NS: name server hostname, ex. 'ns1.telecomx.dk'
TXT: string in quotes, ex. '“v=spf1 mx a ip4:213.83.176.0/23 a:mail.powernetmail.dk -all”'
MX: Mail exchanger, type must be postfixed with a priority number, rData is a hostname, ex. 'mail.telecomx.dk'

Request body example

{
  name: 'mail',
  type: 'A',
  rData: '213.83.176.254',
  new: '213.83.176.250'
}

Response

JSON object
success Boolean True on success.

Example

{
  success: true
}

Errors

Error code Message Description
404 not_found DNS not found
404 records Record not found
422 rData Data is invalid
422 previous Previous record missing
403 access_denied Insufficient access level
500 internal_error <unspecified>
api/dns/updaterecord.txt · Last modified: 2022/03/03 15:54 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki