Domain Host

/domain-host

Hosts are named servers that function as name server for it selves or for other domains. Typically a name server name looks like ns1.example.com and ns2.example.info. Hosts need to be created before you can use them as name servers for any domains with the same TLD.

GET

Returns a list of hosts.

JSON request

domain string The domain ID to be used for filtering.
hostname string Full or partial host name to search for.

JSON response

Possible errors

Sample

curl \
--request GET \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/domain-host" | python -m json.tool

POST

Add a host for a domain. The hostname must be unique for the domain and the hostname must end with the domain name.

JSON request

domain string The domain ID you wish to create the host for.
hostname string The hostname for the host you wish to add. Min. length 4, max. length 255.
ip_addresses string
version number One of ‘4’ or ‘6’.
address string The IP address for version.

Possible errors

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "domain": "e2efca6f-2b4b-4c2b-b183-6ec58a9e329d",
        "hostname": "ns1.hostcontrol.com",
        "ip_addresses": [
            {
                "version": 4,
                "address": "8.8.8.8"
            },
            {
                "version": 4,
                "address": "8.8.4.4"
            }
        ]
    }
' \
"{{api_base_url}}/domain-host" | python -m json.tool

/domain-host/{id}

GET

Get detailed information for this host.

JSON response

object: Domain Host

Possible errors

Sample

curl \
--request GET \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/domain-host/{id}" | python -m json.tool

PUT

Update a specific host.

JSON request

ip_addresses string
version number One of ‘4’ or ‘6’.
address string The IP address for version.

Possible errors

Sample

curl \
--request PUT \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "ip_addresses": [
            {
                "version": 4,
                "address": "8.8.8.8"
            },
            {
                "version": 4,
                "address": "8.8.4.4"
            }
        ]
    }
' \
"{{api_base_url}}/domain-host/{id}" | python -m json.tool

DELETE

Delete a previously created host. If the host is still configured as a nameserver, the host cannot be deleted. In this case, no more domains should be pointing to this host, by either changing the name servers or deleting the domain, before the host can be deleted.

Possible errors

Sample

curl \
--request DELETE \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/domain-host/{id}" | python -m json.tool