User Tools

Site Tools


api:dns:createrecord

API : Dns Create Record

Introduction

This request will add a DNS record to a domain.

Request

URL https://api.telecomx.dk/dns/DOMAIN/record
Method POST
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 name String Name to create a pointer for. Do not include the domain name self.
type String Record type: A, AAAA, CNAME, SRV, NS, TXT, MX.
rData String 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: 'www',
  type: 'A',
  rData: '213.83.176.4'
}

Response

JSON object
success Boolean True on success.

Example

{
  success: true
}

Errors

Error code Message Description
404 not_found DNS not found
422 name Name is invalid
422 type Type is invalid
422 rData Data is invalid
409 name Another record with the same name, type and rData already exist
403 access_denied Insufficient access level
500 internal_error <unspecified>
api/dns/createrecord.txt · Last modified: 2018/12/14 13:20 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki