User Tools

Site Tools


api:dns:list

API : DNS List

Introduction

This request will return the list of domains a customer has.

Request

URL https://api.telecomx.dk/dns
Method GET
Access level VIEWER, MANAGER or OWNER if user belongs to the customer that owns the DNS.
RESELLER if customer belongs to the reseller or a sub reseller.
ADMIN.
Query customer [optional] Id of the customer the domains belongs to, defaults to users own customer.
offset [optional] Index of the first domain to return, default 0.
limit [optional] The number of domains to return, default 100, min 1, max 500.
filter [optional] To filter the domains, this can be used. Domain name and records will be searched.
full [optional] If true, complete DNS objects will be returned instead of the condensed version.

Query examples

https://api.telecomx.dk/dns?customer=1234567890ABCDEF12345678
https://api.telecomx.dk/dns?customer=1234567890ABCDEF12345678&filter=telecom&offset=10&limit=25&full=true

Response

JSON object
offset Index of the first domain returned.
limit Number of domains to return. Note that the actual number of domains returned may be lower.
total Number of domains that can be returned when offset and limit is not considered. This is to be used for paging through the data.
dns Array of domains, see definition below
DNS object (JSON)
_id String Domain name.
records Number Number of records.
ttl String TTL.
status String Status of domain:
OK - in use and working,
NOT_EXIST - domain name does not exist,
WRONG_NS - domain does not point to Telecom X name servers.
DNS object if full=true (JSON)
_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 - normal

{
  offset: 10,
  limit: 25,
  total: 243,
  dns:
  [
    {
      _id: 'telecomx.dk',
      records: 43,
      ttl: 86400,
      status: 'OK'
    },
    {
      _id: 'xtele.dk',
      records: 10,
      ttl: 86400,
      status: 'NOT_EXIST'
    },
    {
       ...
    }
  ]
}

Example - full=true

{
  offset: 10,
  limit: 10,
  total: 23,
  dns:
  [
    {
      _id: 'telecomx.dk',
      customer: '12345678901234567890ABCD',
      product: '12345678901234567890AAAA',
      invoicedUntil: '2018-01-01T00:00:00.000Z',
      serial: 2018112300,
      ttl: 86400,
      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
400 customer Customer not found
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/dns/list.txt · Last modified: 2018/12/14 11:51 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki