User Tools

Site Tools


api:dns:create

API : Dns Create

Introduction

This request will add a new domain.

Request

URL https://api.telecomx.dk/dns
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.
Body _id String Domain name.
customer Id Id of the customer the DNS belongs to.
product Id Product for invoicing DNS hosting fee.
ttl Number Time To Live in seconds, default to 86400.

Request body example

{
  _id: 'telecomx.dk',
  customer: '1234587901234567890ABCD',
  product: '12345678901234567890AAAA',
  ttl: 86400
}

Response

The response will be the newly created DNS, if no errors occurred.

JSON object
_id String Domain name.
customer Id Id of customer the DNS is being used by.
product Id Product for invoicing DNS hosting fee.
invoicedUntil Date The date the fiber has been invoiced until.
serial Number Serial number for current records.
ttl Number Time To Live in seconds.
records Array List of DNS records.
records[].name String Record name.
records[].type String Record type: A, AAAA, CNAME, SRV, NS, TXT, MX.
records[].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'

Note that properties holding no value may be omitted from the object.

Example

{
  _id: 'telecomx.dk',
  customer: '12345678901234567890ABCD',
  product: '12345678901234567890AAAA',
  invoicedUntil: '2018-01-01T00:00:00.000Z',
  serial: 2018112300,
  ttl: 86400,
  records: [ ]
}

Errors

Error code Message Description
403 dns Unable to communicate with DNS server
403 access_denied Insufficient access level
422 _id Invalid domain name
409 _id Domain name already exists
404 customer Customer not found
404 product Product not found
422 ttl TTL not valid
500 internal_error <unspecified>
api/dns/create.txt · Last modified: 2019/06/25 13:12 by Joakim Andersen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki