User Tools

Site Tools


api:dns:update

API : Dns Update

Introduction

This request will update product and/or ttl for a domain.

Request

URL https://api.telecomx.dk/dns/DOMAIN
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 to update.
Body product Id Product for invoicing DNS hosting fee.
ttl Number Time To Live in seconds.

Only properties to update are required.

Request body example

{
  ttl: 3600
}

Response

The response will be the updated 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: 2018112301,
  ttl: 600,
  records: [
    {
      name: '',
      type: 'A',
      rData: '213.83.176.4'
    },
    {
      name: 'www',
      type: 'CNAME',
      rData: 'telecomx.dk'
    },
    {
      name: '',
      type: 'NS',
      rData: 'ns1.telecomx.dk'
    },
    {
      name: '',
      type: 'MX 0',
      rData: 'mail.telecomx.dk'
    },
    {
      name: 'mail',
      type: 'A',
      rData: '213.83.176.6'
    },
    {
      name: '_sip._udp',
      type: 'SRV',
      rData: '0 0 5060 sip.telecomx.dk'
    },
    {
      name: '',
      type: 'TXT',
      rData: '"v=spf1 mx a ip4:213.83.176.0/23 a:mail.powernetmail.dk -all"'
    }
  ]
}

Errors

Error code Message Description
403 access_denied Insufficient access level
404 not_found DNS not found
404 product Product not found
422 ttl TTL not valid
500 internal_error <unspecified>
api/dns/update.txt · Last modified: 2018/12/14 11:52 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki