User Tools

Site Tools


api:dns:get

API : Dns Get

Introduction

This request will return the specified domain.

Request

URL https://api.telecomx.dk/dns/DOMAIN
Method GET
Access level VIEWER, MANAGER or OWNER if user belongs to the customer who owns the DNS.
RESELLER if customer belongs to the reseller.
ADMIN.
Param DOMAIN Domain name.

Query example

https://api.telecomx.dk/dns/telecomx.dk

Response

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.
status String Status of domain: OK, WRONG_NS, NOT_EXIST.
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,
  status: 'OK',
  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
404 not_found DNS not found
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/dns/get.txt · Last modified: 2018/12/14 11:51 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki