Domeneshop API Documentation (v0)

Download OpenAPI specification:Download

Overview

Domeneshop offers a simple, REST-based API, which currently supports the following features:

  • List domains
  • List invoices
  • Create, read, update and delete DNS records for domains
  • Create, read, update and delete HTTP forwards ("WWW forwarding") for domains
  • Dynamic DNS (DDNS) update endpoints for use in consumer routers

More features are planned, including:

  • Web hosting administration
  • Email address and email user/account administration

Testing period

The API service is in version 0, which means it is possible that the interface will change rapidly during the testing period. For that reason, the documentation on these pages may sometimes be outdated.

Additionally, we make no guarantees about the stability of the API service during this testing period, and therefore ask customers to be careful with using the service for business critical purposes.

Authentication

The Domeneshop API currently supports only one method of authentication, HTTP Basic Auth. More authentication methods may be added in the future.

To generate credentials, visit this page after logging in to the control panel on our website:

https://www.domeneshop.no/admin?view=api

Libraries

Domeneshop maintains multiple API libraries to simplify using the API. Please note that these libraries have the same stability guarantees to the API while the API is in version 0.

The libraries may be found in our Github repository.

Domeneshop also maintains a plugin for EFF's Certbot, which automates issuance and renewal of SSL-certificates on your own servers for domains that use Domeneshop's DNS service. This plugin is found in our Github repository here.

basicAuth

With the HTTP Basic Auth authentication method, the token is the username, and the secret is the password.

See above for instructions on how to generate credentials.

Security Scheme Type HTTP
HTTP Authorization Scheme basic

Domains

List domains

Authorizations:
query Parameters
domain
string
Example: domain=.no

Only return domains whose domain field includes this string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Find domain by ID

Authorizations:
path Parameters
domainId
required
integer

ID of the domain

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "domain": "example.com",
  • "expiry_date": "2019-08-24",
  • "registered_date": "2019-08-24",
  • "renew": true,
  • "registrant": "Ola Nordmann",
  • "status": "active",
  • "nameservers":
    [
    ],
  • "services":
    {
    }
}

DNS

These endpoints allow you to list, create and delete DNS records for any domain that has active DNS service.

List DNS records

Authorizations:
path Parameters
domainId
required
integer

ID of the domain

query Parameters
host
string
Example: host=www

Only return records whose host field matches this string

type
string
Example: type=A

Only return records whose type field matches this string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add DNS record

Authorizations:
path Parameters
domainId
required
integer

ID of the domain

Request Body schema: application/json
One of
host
required
string

The host/subdomain the DNS record applies to

ttl
integer <int16> [ 60 .. 604800 ]
Default: 3600

TTL of DNS record in seconds. Must be a multiple of 60.

type
required
string
Value: "A"
data
required
string <ipv4>

IPv4 address

Responses

Request samples

Content type
application/json
Example
{
  • "host": "@",
  • "ttl": 3600,
  • "type": "A",
  • "data": "192.168.0.1"
}

Response samples

Content type
application/json
{
  • "id": 1
}

Find DNS record by ID

Authorizations:
path Parameters
domainId
required
integer

ID of the domain

recordId
required
integer

ID of DNS record

Responses

Response samples

Content type
application/json
Example
{
  • "id": 1,
  • "host": "@",
  • "ttl": 3600,
  • "type": "A",
  • "data": "192.168.0.1"
}

Update DNS record by ID

Authorizations:
path Parameters
domainId
required
integer

ID of the domain

recordId
required
integer

ID of DNS record

Request Body schema: application/json
One of