DNS API

Authentication

Basic auth credentials must be supplied with every request to this API. The username is the zone name. The password can be retrieved from the Dynamic DNS Tab in the Domain control panel.

Base URL

API requests are performed against the base URL https://www.syse.no/api/dns. The relative path to each operation is given below, together with the method verb.

Operations

List custom records

GET /{zone}

Returns a JSON Array of all custom dns records. Please note that service records for managed services are not returned, but you can override them by providing a custom record which shadows the service record. Example output with one list element:

[
    {
        "id": "1234",
        "content": "127.0.0.1",
        "active": false,
        "prio": 10,
        "ttl": 10800,
        "prefix": "www",
        "type": "A"
    }
]

Create custom record

POST /{zone}

Create a new custom record. An ID is generated and returned with the response. Example payload:

{
    "content": "127.0.0.1",
    "active": false,
    "prio": 10,
    "ttl": 10800,
    "prefix": "www",
    "type": "A"
}

Update custom record

PUT /{zone}/{id}

Update an existing custom record. The id in the URL must match the id in the object. Example payload:

{
    "id": "1234",
    "content": "127.0.0.1",
    "active": false,
    "prio": 10,
    "ttl": 10800,
    "prefix": "www",
    "type": "A"
}

Delete custom record

DELETE /{zone}/{id}

Delete an existing custom record.

Attributes, record types and validation rules

Below you'll find a list of attributes common for all operations, along with a list of valid record types and the spesific validation rule for each record type.

Attributes

Name Type Notes Default Description
prefix string required - The prefix this record applies to, e.g. ‘www’.
type string required - The type of DNS records, e.g. 'A’ or 'TXT’.
active boolean required true If set to false, the corresponding DNS entry will disappear from the zones DNS.
content string - - Must not exceed 65535 characters and may only contain printable ASCII characters.
ttl integer - 3600 Can be set from 60 seconds (1 minute) to 259200 seconds (3 days). Default is always 3600 seconds (1 hour). Customer UI implemtors should probably not allow TTLs lower than 600s (10 minutes).
prio integer - 0 (If present) must be an integer between 0 and 65535.

Supported record types

Definitions

   
Printable ASCII Matches ^[ -~]*$
Valid host name Matches ^((\*\.)?((([a-z0-9-]*[a-z0-9])\.)+[a-z]+))$
Valid DNS name Matches ^(([_a-z0-9]([_a-z0-9-]*[a-z0-9])?\.)*([_a-z0-9]([a-z0-9-]*[a-z0-9])?\.)+([a-z]([a-z0-9-]*[a-z])))$

Note that hostnames accepts wildcards for some record types.

Validation rules

In general

CNAME

Conflicts with

A

Conflicts with

AAAA

Conflicts with

MX

Conflicts with

TXT

Conflicts with

SRV

Conflicts with

SSHFP

Conflicts with

TLSA

Conflicts with

AFSDB

Conflicts with

LOC

Conflicts with

CAA

Conflicts with

SVCB/HTTPS

Conflicts with