NAV Navbar
php

Introduction

Welcome to the Alice-IT API documentation.

We have a php client for our API. You can also use our php client via composer: composer require aliceit/aliceit-php-client

Authentication

To authorize, use this code:

<?php
$client = new AliceIT\Client('your-api-token');
?>

Make sure to replace your-api-token with your API key.

The Alice-IT API uses API tokens to allow access to the API. You can create your API token in our customer portal.

Our API expects for the API key to be included in all API requests to the server.

Cloud Root Server

Create Cloud Root Server

<?php
$cores = 4; // 4 Cores
$memory = 4096; // 4096 MB RAM
$disk = 10; // 10 GB SSD Ceph primary disk
$ips = 2; // 2 IPv4 addresses
$os = 1; // OS ID from "Get available OS"
$disk_secondary= 100; // 100 GB HDD secondary disk [optional]
$hostname = "vm123.alice-it.de"; // optional
$password = "ACn7fSfPWqEr"; // optional
$traffic = 500; // 500 GB traffic limit [optional]
$client->services()->cloud_server()->create($cores, $memory, $disk, $ips, $os, $disk_secondary, $hostname, $password, $traffic);

The above command returns JSON structured like this:

{
    "success": true,
    "data": [
        {
            "id": 1000518,
            "ipv4": [
                "1.1.1.1", 
                "1.1.1.2"
            ],
            "password": "ACn7fSfPWqEr",
            "hostname": "vm123.alice-it.de"
        }
    ]
}

This endpoint retrieves all cloud root servers.

HTTP Request

POST https://meine.alice-it.de/api/v1/services/kvm

URL Parameters

Parameter Description
cores The amount of cores assigned to the server
memory The amount of memory assigned to the server in Megabytes
disk The size of the primary SSD Ceph disk in Gigabytes
ips The amount of IPv4 addresses
os The OS ID
disk_secondary The size of the secondary HDD disk in Gigabytes (optional)
hostname The server hostname. If none is set, a password will be generated (optional)
password The root password. If none is set, a password will be generated (optional)
traffic Hard traffic limit in GB. The Server will shutdown if it reaches the traffic limit (optional)

Get all Cloud Root Server

<?php
$client->services()->cloud_server()->getAll();

The above command returns JSON structured like this:

{
    "success": true,
    "data": [
        {
            "id": 1000518,
            "cores": 2,
            "memory": 4096,
            "disk": 50,
            "disk_secondary": null,
            "created_at": "2019-09-27T20:50:09.000000Z",
            "traffic_max": null,
            "ipv4": 1
        },
        {
            "id": 1000519,
            "cores": 1,
            "memory": 2048,
            "disk": 25,
            "disk_secondary": null,
            "created_at": "2019-09-27T20:52:50.000000Z",
            "traffic_max": null,
            "ipv4": 2
        }
    ]
}

This endpoint retrieves all cloud root servers.

HTTP Request

GET https://meine.alice-it.de/api/v1/services/kvm

Get Cloud Server status

<?php
$client->services()->cloud_server()->single(1000519)->getStatus();

The above command returns JSON structured like this:

{
    "success": true,
    "errors": [],
    "data": {
        "id": 1000519,
        "cores": 1,
        "memory": 2048,
        "disk": 25,
        "ipv4": [
            {
                "ip": "1.1.1.1",
                "rdns": null
            },
            {
                "ip": "1.1.1.2",
                "rdns": null
            }
        ],
        "backups": 1,
        "status": {
            "status": "stopped",
            "cpu": 0,
            "cpus": 1,
            "mem": 0,
            "maxmem": 2147483648,
            "disk": 0,
            "maxdisk": 26843545600,
            "diskread": 0,
            "diskwrite": 0,
            "uptime": 0,
            "netin": 0,
            "netout": 0,
            "installation": "DONE",
            "installation_started": "2019-09-27 22:53:03",
            "mounted_iso": null
        }
    }
}

This endpoint retrieves the cloud root server status.

HTTP Request

GET https://meine.alice-it.de/api/v1/services/kvm/<server_id>/status

URL Parameters

Parameter Description
server_id The ID of the cloud root server

Start Cloud Server

<?php
$client->services()->cloud_server()->single(1000519)->start();

The above command returns JSON structured like this:

{
    "success": true,
    "data": [],
    "errors": [],
}

This endpoint starts the cloud root server.

HTTP Request

POST https://meine.alice-it.de/api/v1/services/kvm/<server_id>/status/start

URL Parameters

Parameter Description
server_id The ID of the cloud root server

Shutdown Cloud Server

<?php
$client->services()->cloud_server()->single(1000519)->shutdown();

The above command returns JSON structured like this:

{
    "success": true,
    "data": [],
    "errors": [],
}

This endpoint shuts down the cloud root server.

HTTP Request

POST https://meine.alice-it.de/api/v1/services/kvm/<server_id>/status/shutdown

URL Parameters

Parameter Description
server_id The ID of the cloud root server

Stop Cloud Server

<?php
$client->services()->cloud_server()->single(1000519)->stop();

The above command returns JSON structured like this:

{
    "success": true,
    "data": [],
    "errors": [],
}

This endpoint stops the cloud root server.

HTTP Request

POST https://meine.alice-it.de/api/v1/services/kvm/<server_id>/status/stop

URL Parameters

Parameter Description
server_id The ID of the cloud root server

Restart Cloud Server

<?php
$client->services()->cloud_server()->single(1000519)->restart();

The above command returns JSON structured like this:

{
    "success": true,
    "data": [],
    "errors": [],
}

This endpoint restarts the cloud root server.

HTTP Request

POST https://meine.alice-it.de/api/v1/services/kvm/<server_id>/status/restart

URL Parameters

Parameter Description
server_id The ID of the cloud root server

VNC Console

<?php
$client->services()->cloud_server()->single(1000519)->getVncConsole();

The above command returns JSON structured like this:

{
    "success": true,
    "data": {
        "url": "https:\/\/console.alice-it.de\/vnc.html?autoconnect=1&path=websockify?token%3D7NTkwMA==&host=console.alice-it.de&port=6080&password=XXX"
    },
    "errors": []
}

This endpoint returns the vnc console url of the cloud root server.

HTTP Request

GET https://meine.alice-it.de/api/v1/services/kvm/<server_id>/vnc

URL Parameters

Parameter Description
server_id The ID of the cloud root server

Get available OS

<?php
$client->services()->cloud_server()->listOS();

The above command returns JSON structured like this:

{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Debian 10 \"buster\""
        },
        {
            "id": 2,
            "name": "Debian 9 \"stretch\""
        },
        {
            "id": 3,
            "name": "Debian 8 \"jessie\""
        },
        {
            "id": 4,
            "name": "Ubuntu 19.04 \"disco\""
        },
        {
            "id": 5,
            "name": "Ubuntu 18.10 \"cosmic\""
        },
        {
            "id": 6,
            "name": "Ubuntu 18.04 \"bionic\""
        },
        {
            "id": 7,
            "name": "Ubuntu 16.04 \"xenial\""
        }
    ],
    "errors": []
}

This endpoint returns a list of available operating systems.

HTTP Request

GET https://meine.alice-it.de/api/v1/services/kvm/os

Get available ISOs

<?php
$client->services()->cloud_server()->listISO();

The above command returns JSON structured like this:

{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Debian 9.6 Netinstall"
        },
        {
            "id": 2,
            "name": "Windows Server 2016 Deutsch"
        },
        {
            "id": 3,
            "name": "Windows Server 2019 Deutsch"
        },
        {
            "id": 4,
            "name": "virtio-win-0.1.171"
        }
    ],
    "errors": []
}

This endpoint returns a list of available ISO files.

HTTP Request

GET https://meine.alice-it.de/api/v1/services/kvm/iso

Mount ISO

<?php
$client->services()->cloud_server()->single(1000519)->mountISO(1);

The above command returns JSON structured like this:

{
    "success": true,
    "data": [],
    "errors": [],
}

This endpoint mounts a ISO file.

HTTP Request

POST https://meine.alice-it.de/api/v1/services/kvm/<server_id>/iso

URL Parameters

Parameter Description
server_id The ID of the cloud root server
iso The ID of the ISO file

Unmount ISO

<?php
$client->services()->cloud_server()->single(1000519)->unmountISO();

The above command returns JSON structured like this:

{
    "success": true,
    "data": [],
    "errors": [],
}

This endpoint unmounts the ISO file.

HTTP Request

DELETE https://meine.alice-it.de/api/v1/services/kvm/<server_id>/iso

URL Parameters

Parameter Description
server_id The ID of the cloud root server

Reinstall Server

<?php
$template = 1;
$hostname = "srv100519.alice-it.de";
$password = "8vj28skh0X1";

$client->services()->cloud_server()->single(1000519)->reinstall($template, $hostname, $password);

The above command returns JSON structured like this:

{
    "success": true,
    "data": [],
    "errors": [],
}

This endpoint unmounts the ISO file.

HTTP Request

POST https://meine.alice-it.de/api/v1/services/kvm/<server_id>/reinstall

URL Parameters

Parameter Description
server_id The ID of the cloud root server
os The ID of the OS
hostname The new hostname for the server
password The new password for the server

Delete Server

<?php
$client->services()->cloud_server()->single(1000519)->deleteServer();

The above command returns JSON structured like this:

{
    "success": true,
    "data": [],
    "errors": [],
}

This endpoint deletes the server.

HTTP Request

DELETE https://meine.alice-it.de/api/v1/services/kvm/<server_id>

URL Parameters

Parameter Description
server_id The ID of the cloud root server

Change Server performance

<?php
$cores = 4;
$memory = 4096;
$disk = 50;
$disk_hdd = 0;
$ipv4 = 3;

$client->services()->cloud_server()->single(1000519)->changePerformance($cores, $memory, $disk, $disk_hdd, $ipv4);

The above command returns JSON structured like this:

{
    "success": true,
    "data": [],
    "errors": [],
}

This endpoint changes the performance of the server.

HTTP Request

PUT https://meine.alice-it.de/api/v1/services/kvm/<server_id>

URL Parameters

Parameter Description
server_id The ID of the cloud root server
cores The amount of cores assigned to the server
memory The amount of memory assigned to the server in Megabytes
disk The size of the primary SSD Ceph disk in Gigabytes
disk_secondary The size of the secondary HDD disk in Gigabytes (default: 0)
ips The amount of IPv4 addresses

Get Server tasks

<?php
$client->services()->cloud_server()->single(1000519)->tasks();

The above command returns JSON structured like this:

{
    "success": true,
    "data": [
        {
            "name": "qmstart",
            "state": "OK",
            "created_at": "2019-09-27T22:17:18.000000Z"
        },
        {
            "name": "qmstop",
            "state": "OK",
            "created_at": "2019-09-27T22:13:22.000000Z"
        },
        {
            "name": "qmstart",
            "state": "OK",
            "created_at": "2019-09-27T20:54:47.000000Z"
        },
        {
            "name": "qmcreate",
            "state": "OK",
            "created_at": "2019-09-27T20:54:36.000000Z"
        }
    ]
}

This endpoint retreives a list of tasks performed on the server.

HTTP Request

GET https://meine.alice-it.de/api/v1/services/kvm/<server_id>/tasks

URL Parameters

Parameter Description
server_id The ID of the cloud root server

Get Server traffic

<?php
$client->services()->cloud_server()->single(1000519)->traffic();

The above command returns JSON structured like this:

{
    "success": true,
    "data": [
        {
          "all": {
              "in": 974381056,
              "out": 6692888576,
              "sum": 7667269632
          },
          "ips": {
              "1.1.1.1": {
                  "in": 597827584,
                  "out": 3142631424,
                  "sum": 3740459008,
                  "start_date": "2019-09-21T14:01:43.954272Z",
                  "end_date": "2019-10-21T14:01:43.954272Z"
              },
              "1.1.1.0": {
                  "in": 376553472,
                  "out": 3550257152,
                  "sum": 3926810624,
                  "start_date": "2019-09-21T14:01:43.954272Z",
                  "end_date": "2019-10-21T14:01:43.954272Z"
              }
          }
        }
    ]
}
{

}

This endpoint retreives the traffic of all ips for the last month.

HTTP Request

GET https://meine.alice-it.de/api/v1/services/kvm/<server_id>/traffic

URL Parameters

Parameter Description
server_id The ID of the cloud root server

Get Server rrd data

<?php
$tf = "hour";
$cf = "AVERAGE";

$client->services()->cloud_server()->single(1000519)->rrdData($tf, $cf);

The above command returns JSON structured like this:

{
    "success": true,
    "data": [
        {
            "tf": "hour",
            "cf": "AVERAGE",
            "mem": [
                {
                    "time": 1571662440,
                    "value": "0"
                },
                {
                    "time": 1571662500,
                    "value": "0"
                },
                ...
            ],
            "disk": [
                {
                    "time": 1571662440,
                    "read": "0",
                    "write": "0"
                },
                {
                    "time": 1571662500,
                    "read": "0",
                    "write": "0"
                },
                ...
            ],
            "net": ...,
            "cpu": ...
        }
    ],
}

This endpoint retreives the servers rrd data.

HTTP Request

GET https://meine.alice-it.de/api/v1/services/kvm/<server_id>/traffic

URL Parameters

Parameter Description
server_id The ID of the cloud root server
tf the timeframe of the data. Allowed: hour, day, week, month, year
cf allowed: AVERAGE, MAX

Set rDNS record

<?php
$ip = "1.1.1.1";
$rdns = "rdns.server.com";

$client->services()->cloud_server()->single(1000519)->setRdns($ip, $rdns);

The above command returns JSON structured like this:

{
    "success": true,
    "data": [],
    "errors": [],
}

This endpoint sets the rdns record a servers ip.

HTTP Request

POST https://meine.alice-it.de/api/v1/services/kvm/<server_id>/rdns

URL Parameters

Parameter Description
server_id The ID of the cloud root server
ip the ip address
value the rnds name

Domains

Get all Domains

<?php

$client->services()->domains()->getAll();

The above command returns JSON structured like this:

{
    "success": true,
    "data": [
        {
            "id": 12345,
            "sld": "alice-it",
            "tld": "de",
            "status": "ok",
            "owner": {
                ...
            },
            "admin": {
                ...
            },
            "tech": {
                ...
            },
            "zone": {
                ...
            },
            "ns1": {
                ...
            },
            "ns2": {
                ...
            },
            "created_at": "2019-09-27T20:52:50.000000Z",
            "payed_until": "2020-09-27T20:52:50.000000Z",
            "canceled_for": null,
            "authcode": null,
        }, {
            "id": 12346,
            "sld": "alice-it",
            "tld": "com",
            "status": "ok",
            "owner": {
                ...
            },
            "admin": {
                ...
            },
            "tech": {
                ...
            },
            "zone": {
                ...
            },
            "ns1": {
                ...
            },
            "ns2": {
                ...
            },
            "created_at": "2019-09-27T20:52:50.000000Z",
            "payed_until": "2020-09-27T20:52:50.000000Z",
            "canceled_for": null,
            "authcode": null,
        }
    ]
}

This endpoint returns all domains.

HTTP Request

GET https://meine.alice-it.de/api/v1/services/domains

Create Domains

<?php
$sld        = "alice-it";       // SLD of Domain you want to register
$tld        = "de";             // TLD of Domain you want to register
$authcode   = "a983ni-oa";      // AuthCode of Domain (Only required for domain transfer)
$owner      = 10001;            // ID of the owner handle [optional, if you set default handle in our resellerportal]
$admin      = 10001;            // ID of the admin handle [optional, if you set default handle in our resellerportal]
$tech       = 10001;            // ID of the tech handle [optional, if you set default handle in our resellerportal]
$zone       = 10001;            // ID of the zone handle [optional, if you set default handle in our resellerportal]
$ns1        = 123;              // ID of the primary nameserver [optional, if you set default nameserver in our resellerportal]
$ns2        = 124;              // ID of the secondary nameserver [optional, if you set default nameserver in our resellerportal]
$ns3        = "";               // ID of additional nameserver [optional]
$ns4        = "";               // ID of additional nameserver [optional]
$ns5        = "";               // ID of additional nameserver [optional]
$client->services()->domains()->create($sld, $tld, $authcode, $owner, $admin, $tech, $zone, $ns1, $ns2, $ns3, $ns4, $ns5);

The above command returns JSON structured like this:

{
    "success": true,
    "message": "domain successfully created",
    "data": {
        "sld": "alice-it",
        "tld": "de",
        "status": "ok",
        "owner": {
            ...
        },
        "admin": {
            ...
        },
        "tech": {
            ...
        },
        "zone": {
            ...
        },
        "ns1": {
            ...
        },
        "ns2": {
            ...
        },
        "created_at": "2019-09-27T20:52:50.000000Z",
        "payed_until": "2020-09-27T20:52:50.000000Z",
        "canceled_for": null,
        "authcode": null,   
    }
}

This endpoint registers a new domain.

HTTP Request

POST https://meine.alice-it.de/api/v1/services/domains

URL Parameters

Parameter Description
sld SLD of Domain you want to register
tld TLD of Domain you want to register
authcode AuthCode of Domain (Only required for domain transfer)
owner ID of the owner handle [optional, if you set default handle in our resellerportal]
admin ID of the admin handle [optional, if you set default handle in our resellerportal]
tech ID of the tech handle [optional, if you set default handle in our resellerportal]
zone ID of the zone handle [optional, if you set default handle in our resellerportal]
ns1 ID of the primary nameserver [optional, if you set default nameserver in our resellerportal]
ns2 ID of the secondary nameserver [optional, if you set default nameserver in our resellerportal]
ns3 ID of additional nameserver [optional]
ns4 ID of additional nameserver [optional]
ns5 ID of additional nameserver [optional]

Get Domain Prices

<?php
$tld        = "de";             // TLD of Domain you want to get the price for (optional)
$client->services()->domains()->prices($tld);

// or

$client->services()->domains()->prices(); // will return all tld prices

The above command returns JSON structured like this:

{
    "success": true,
    "data": [
        {
            "tld": "ac",
            "create": XX.XX,
            "renew": XX.XX,
            "update": XX.XX,
            "restore": XX.XX,
            "transfer": XX.XX
        },
        {
            "tld": "academy",
            "create": XX.XX,
            "renew": XX.XX,
            "update": XX.XX,
            "restore": XX.XX,
            "transfer": XX.XX
        },
        ...

This endpoint will get the current domain prices. Due to currency exchanges our prices can change every day.

HTTP Request

GET https://meine.alice-it.de/api/v1/services/domains/price?tld=<tld>

URL Parameters

Parameter Description
tld TLD of Domain you want to get the price for

Check Domain Availability

<?php
$sld        = "alice-it";       // SLD of Domain you want to check
$tld        = "de";             // TLD of Domain you want to check
$client->services()->domains()->checkAvailability($sld, $tld);

The above command returns JSON structured like this:

{
    "success": true,
    "status": "available"
}

This endpoint will show the availability for the requested domain

HTTP Request

GET https://meine.alice-it.de/api/v1/services/domains/check?sld=<sld>&tld=<tld>

URL Parameters

Parameter Description
sld SLD of Domain you want to check
tld TLD of Domain you want to check

Get single Domains

<?php

$client->services()->domains()->single(12345)->get();

The above command returns JSON structured like this:

{
    "success": true,
    "data": {
        "id": 12345,
        "sld": "alice-it",
        "tld": "de",
        "status": "ok",
        "owner": {
            ...
        },
        "admin": {
            ...
        },
        "tech": {
            ...
        },
        "zone": {
            ...
        },
        "ns1": {
            ...
        },
        "ns2": {
            ...
        },
        "created_at": "2019-09-27T20:52:50.000000Z",
        "payed_until": "2020-09-27T20:52:50.000000Z",
        "canceled_for": null,
        "authcode": null,
    }

}

This endpoint returns all domains.

HTTP Request

GET https://meine.alice-it.de/api/v1/services/domains/<service_id>

URL Parameters

Parameter Description
service_id ID of the domain

Update Domain

<?php
$owner      = 10001;            // ID of the owner handle
$admin      = 10001;            // ID of the admin handle
$tech       = 10001;            // ID of the tech handle
$zone       = 10001;            // ID of the zone handle
$ns1        = 123;              // ID of the primary nameserver
$ns2        = 124;              // ID of the secondary nameserver
$ns3        = "";               // ID of additional nameserver [optional]
$ns4        = "";               // ID of additional nameserver [optional]
$ns5        = "";               // ID of additional nameserver [optional]
$client->services()->domains()->single(12345)->update($owner, $admin, $tech, $zone, $ns1, $ns2, $ns3, $ns4, $ns5);

The above command returns JSON structured like this:

{
    "success": true,
    "message": "domain successfully updated",
    "data": {
        "id": 12345,
        "sld": "alice-it",
        "tld": "de",
        "status": "ok",
        "owner": {
            ...
        },
        "admin": {
            ...
        },
        "tech": {
            ...
        },
        "zone": {
            ...
        },
        "ns1": {
            ...
        },
        "ns2": {
            ...
        },
        "created_at": "2019-09-27T20:52:50.000000Z",
        "payed_until": "2020-09-27T20:52:50.000000Z",
        "canceled_for": null,
        "authcode": null,   
    }
}

This endpoint registers a new domain.

HTTP Request

PUT https://meine.alice-it.de/api/v1/services/domains/<domain_id>

URL Parameters

Parameter Description
service_id  ID of the domain
owner ID of the owner handle
admin ID of the admin handle
tech ID of the tech handle
zone ID of the zone handle
ns1 ID of the primary nameserver
ns2 ID of the secondary nameserver
ns3 ID of additional nameserver [optional]
ns4 ID of additional nameserver [optional]
ns5 ID of additional nameserver [optional]

Delete Domains

<?php

$date = "now"; // can be "now", "expire", "undelete"

$client->services()->domains()->single(12345)->delete($date);

The above command returns JSON structured like this:

{
    "success": true,
    "message": "domain deletion successfully received",
    "data": {
        "canceled_for": "2019-09-28T20:52:50.000000Z",
    }
}

This endpoint will create a delete operation for a domain.

HTTP Request

DELETE https://meine.alice-it.de/api/v1/services/domains/<service_id>

URL Parameters

Parameter Description
service_id ID of the domain
date Date for when the domain will be deleted ["now", "expire", "undelete"]

Domain Nameservers

Get all Nameservers

<?php

$client->services()->domains()->nameservers()->getAll();

The above command returns JSON structured like this:

{
    "success": true,
    "data": [
        {
            "id": 1234,
            "name": "ns1.alice-it.de",
            "ip_address": "127.0.0.1"
        }, {
            "id": 1235,
            "name": "ns2.alice-it.de",
            "ip_address": "127.0.0.2"
        }
    ]
}

This endpoint returns all nameservers.

HTTP Request

GET https://meine.alice-it.de/api/v1/services/domains/nameservers

Create Nameserver

<?php
$name       = "ns1.alice-it.de";       // Hostname of the nameserver
$client->services()->domains()->nameservers()->create($name);

The above command returns JSON structured like this:

{
    "success": true,
    "data": {
        "id": 1235,
        "name": "ns1.alice-it.de",
        "ip_address": "127.0.0.1"
    }
}

This endpoint adds a new nameserver.

HTTP Request

POST https://meine.alice-it.de/api/v1/services/domains/nameservers

URL Parameters

Parameter Description
name Hostname of the nameserver

Update Nameserver

<?php
$client->services()->domains()->nameservers()->single(1234)->update();

The above command returns JSON structured like this:

{
    "success": true,
    "data": {
        "id": 1235,
        "name": "ns1.alice-it.de",
        "ip_address": "127.0.0.1"
    }
}

This endpoint will update the ip address of the given nameserver

HTTP Request

PUT https://meine.alice-it.de/api/v1/services/domains/nameservers/<nameserver_id>

URL Parameters

Parameter Description
nameserver_id ID of the nameserver

Delete Nameserver

<?php
$client->services()->domains()->nameservers()->single(1234)->delete();

The above command returns JSON structured like this:

{
    "success": true,
    "data": []
}

This endpoint will delete the nameserver

HTTP Request

DELETE https://meine.alice-it.de/api/v1/services/domains/nameservers/<nameserver_id>

URL Parameters

Parameter Description
nameserver_id ID of the nameserver

Domain Handles

Get all Handles

<?php

$client->services()->domains()->handles()->getAll();

The above command returns JSON structured like this:

{
    "success": true,
    "data": [
        {
            "id": 3,
            "type": "PERS",
            "fname": "Niklas",
            "lname": "Schmolke",
            "organisation": "Alice GmbH",
            "street": "Die\u00dfemer Bruch",
            "street_no": "112c",
            "postalcode": "47805",
            "city": "Krefeld",
            "countrycode": "DE",
            "phone": "+49.65160343990",
            "fax": "+49.65160343999",
            "email": "info@alice-it.de",
            "idcard": null,
            "idcardissuedate": null,
            "idcardauthority": null,
            "sex": "MALE",
            "region": "Nordrhein-Westfalen",
            "taxnr": null,
            "vatnr": null,
            "birthdate": null,
            "birthplace": null,
            "registernumber": null,
            "birthregion": null,
            "birthcountry": "DE"
        }, {
            "id": 4,
            "type": "PERS",
            "fname": "Yannick",
            "lname": "Butzke",
            "organisation": "Alice GmbH",
            "street": "Die\u00dfemer Bruch",
            "street_no": "112c",
            "postalcode": "47805",
            "city": "Krefeld",
            "countrycode": "DE",
            "phone": "+49.65160343990",
            "fax": "+49.65160343999",
            "email": "info@alice-it.de",
            "idcard": null,
            "idcardissuedate": null,
            "idcardauthority": null,
            "sex": "MALE",
            "region": "Nordrhein-Westfalen",
            "taxnr": null,
            "vatnr": null,
            "birthdate": null,
            "birthplace": null,
            "registernumber": null,
            "birthregion": null,
            "birthcountry": "DE"
        }
    ]
}

This endpoint returns all handles.

HTTP Request

GET https://meine.alice-it.de/api/v1/services/domains/handles

Create Handle

<?php
$type               = "PERS";
$fname              = "Niklas";
$lname              = "Schmolke";
$organisation       = "Alice GmbH";
$street             = "Dießemer Bruch";
$street_no          = "112c";
$postalcode         = "47805";
$city               = "Krefeld";
$countrycode        = "DE";
$phone              = "+49.65160343990";
$fax                = "+49.65160343999";
$email              = "info@alice-it.de";
$idcard             = null;
$idcardissuedate    = null;
$idcardauthority    = null;
$sex                = "MALE";
$region             = "Nordrhein-Westfalen";
$taxnr              = null;
$vatnr              = null;
$birthdate          = null;
$birthplace         = null;
$registernumber     = null;
$birthregion        = null;
$birthcountry       = "DE";
$client->services()->domains()->handles()->create($type, $fname, $lname, $street, $street_no, $postalcode, $city, $countrycode, $phone, $fax, $email, $sex, $organisation, $idcard, $idcardissuedate, $idcardauthority, $region, $taxnr, $birthdate, $birthcountry, $birthplace, $birthregion, $registernumber);

The above command returns JSON structured like this:

{
    "success": true,
    "data": {
        "id": 4,
        "type": "PERS",
        "fname": "Yannick",
        "lname": "Butzke",
        "organisation": "Alice GmbH",
        "street": "Die\u00dfemer Bruch",
        "street_no": "112c",
        "postalcode": "47805",
        "city": "Krefeld",
        "countrycode": "DE",
        "phone": "+49.65160343990",
        "fax": "+49.65160343999",
        "email": "info@alice-it.de",
        "idcard": null,
        "idcardissuedate": null,
        "idcardauthority": null,
        "sex": "MALE",
        "region": "Nordrhein-Westfalen",
        "taxnr": null,
        "vatnr": null,
        "birthdate": null,
        "birthplace": null,
        "registernumber": null,
        "birthregion": null,
        "birthcountry": "DE"
    }
}

This endpoint adds a new handle.

HTTP Request

POST https://meine.alice-it.de/api/v1/services/domains/handles

URL Parameters

Parameter Description
type Type of handle (PERS
fname Firstname
lname Surname
organisation Organisation
street Street
street_no Street Number
postalcode Postalcode
city City
countrycode Countrycode (e.g. DE)
phone Phone
fax Telefax
email eMail Address
idcard Passport number
idcardissuedate Passport issue date
idcardauthority Passport authority
sex Sexuality (MALE
region Region
taxnr Tax Number
vatnr Vat Number
birthdate Birthdate
birthplace Birthplace
registernumber Registernumber
birthregion Birthregion
birthcountry Birthcountry

Update Handle

<?php
$organisation       = "Alice GmbH";
$street             = "Dießemer Bruch";
$street_no          = "112c";
$postalcode         = "47805";
$city               = "Krefeld";
$countrycode        = "DE";
$phone              = "+49.65160343990";
$fax                = "+49.65160343999";
$email              = "info@alice-it.de";
$idcard             = null;
$idcardissuedate    = null;
$idcardauthority    = null;
$region             = "Nordrhein-Westfalen";
$taxnr              = null;
$vatnr              = null;
$birthdate          = null;
$birthplace         = null;
$registernumber     = null;
$birthregion        = null;
$birthcountry       = "DE";
$client->services()->domains()->handles()->single(4)->update($street, $street_no, $postalcode, $city, $countrycode, $phone, $fax, $email, $organisation, $idcard, $idcardissuedate, $idcardauthority, $sex, $region, $taxnr, $vatnr, $birthdate, $birthplace, $registernumber, $birthregion, $birthcountry);

The above command returns JSON structured like this:

{
    "success": true,
    "data": {
        "id": 4,
        "type": "PERS",
        "fname": "Yannick",
        "lname": "Butzke",
        "organisation": "Alice GmbH",
        "street": "Die\u00dfemer Bruch",
        "street_no": "112c",
        "postalcode": "47805",
        "city": "Krefeld",
        "countrycode": "DE",
        "phone": "+49.65160343990",
        "fax": "+49.65160343999",
        "email": "info@alice-it.de",
        "idcard": null,
        "idcardissuedate": null,
        "idcardauthority": null,
        "sex": "MALE",
        "region": "Nordrhein-Westfalen",
        "taxnr": null,
        "vatnr": null,
        "birthdate": null,
        "birthplace": null,
        "registernumber": null,
        "birthregion": null,
        "birthcountry": "DE"
    }
}

This endpoint updates a handle.

HTTP Request

PUT https://meine.alice-it.de/api/v1/services/domains/handles/<handle_id>

URL Parameters

Parameter Description
handle_id ID of the handle
organisation Organisation
street Street
street_no Street Number
postalcode Postalcode
city City
countrycode Countrycode (e.g. DE)
phone Phone
fax Telefax
email eMail Address
idcard Passport number
idcardissuedate Passport issue date
idcardauthority Passport authority
sex Sexuality (MALE
region Region
taxnr Tax Number
vatnr Vat Number
birthdate Birthdate
birthplace Birthplace
registernumber Registernumber
birthregion Birthregion
birthcountry Birthcountry

Domain Zones

Get all Zones

<?php

$client->services()->domains()->zones()->getAll();

The above command returns JSON structured like this:

{
    "success": true,
    "data": [
        {
            "id": 12345,
            "name": "alice-it.de",
            "soa_email": "hostmaster@alice-it.de",
            "soa_refresh": 10800,
            "soa_ttl": 3600,
            "soa_expire": 604800,
            "soa_retry": 3600
        },
        {
            "id": 12346,
            "name": "alice-it.com",
            "soa_email": "hostmaster@alice-it.com",
            "soa_refresh": 10800,
            "soa_ttl": 3600,
            "soa_expire": 604800,
            "soa_retry": 3600
        }
    ]
}

This endpoint returns all zones.

HTTP Request

GET https://meine.alice-it.de/api/v1/services/domains/zones

Create Zone

<?php
$zone_name  = "alice-it.de";
$ttl        = 300;
$ns1        = "ns1.alice-it.de";
$ns2        = "ns2.alice-it.de";

$client->services()->domains()->zones()->create($zone_name, $ttl, $ns1, $ns2);

The above command returns JSON structured like this:

{
    "success": true,
    "data": {
        "id": 12345,
        "name": "alice-it.de",
        "soa_email": "hostmaster@alice-it.de",
        "soa_refresh": "10800",
        "soa_ttl": "300",
        "soa_expire": "604800",
        "soa_retry": "3600",
        "records": [
            {
                "name": "@",
                "ttl": 300,
                "type": "NS",
                "content": "ns1.alice-it.de."
            },
            {
                "name": "@",
                "ttl": 300,
                "type": "NS",
                "content": "ns2.alice-it.de."
            }
        ]
    },
    "errors": []
}

This endpoint adds a new zone to our nameservers.

HTTP Request

POST https://meine.alice-it.de/api/v1/services/domains/zones

URL Parameters

Parameter Description
zone_name Name of the zone
ttl Time to live
ns1 Primary Nameserver
ns2 Secondary Nameserver

Get single Zone

<?php

$client->services()->domains()->zones()->single(12345)->get();

The above command returns JSON structured like this:

{
    "success": true,
    "data": {
        "id": 12345,
        "name": "alice-it.de",
        "soa_email": "hostmaster@alice-it.de",
        "soa_refresh": 10800,
        "soa_ttl": 300,
        "soa_expire": 604800,
        "soa_retry": 3600,
        "records": [
            {
                "name": "@",
                "ttl": 300,
                "type": "NS",
                "content": "ns1.alice-it.de."
            },
            {
                "name": "@",
                "ttl": 300,
                "type": "NS",
                "content": "ns2.alice-it.de."
            }
        ]
    }
}

This endpoint gets a zones data and records.

HTTP Request

GET https://meine.alice-it.de/api/v1/services/domains/zones/<zone_id>

URL Parameters

Parameter Description
zone_id ID of the zone

Insert Zone record

<?php

$type       = "A";
$name       = "@";
$content    = "127.0.0.1";
$ttl        = 300;

$client->services()->domains()->zones()->single(12345)->insertRecord($type, $name, $content, $ttl);

The above command returns JSON structured like this:

{
    "success": true,
    "message": "record was created",
    "data": []
}

This endpoint creates a new record in the given zone.

HTTP Request

POST https://meine.alice-it.de/api/v1/services/domains/zones/<zone_id>/records

URL Parameters

Parameter Description
zone_id ID of the zone
type type of record
name name of record (@ for domain, * for wildcard)
content target of record
ttl time to live

Delete Zone record

<?php

$type       = "A";
$name       = "@";
$content    = "127.0.0.1";

$client->services()->domains()->zones()->single(12345)->deleteRecord($type, $name, $content);

The above command returns JSON structured like this:

{
    "success": true,
    "message": "record was deleted",
    "data": []
}

This endpoint deletes a zones record.

HTTP Request

DELETE https://meine.alice-it.de/api/v1/services/domains/zones/<zone_id>/records

URL Parameters

Parameter Description
zone_id ID of the zone
type type of record
name name of record (@ for domain, * for wildcard)
content target of record

Errors

Our API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The object requires authentication.
404 Not Found -- The specified object could not be found.
405 Method Not Allowed -- You tried to access a object with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The ressource has been removed from our servers.
429 Too Many Requests -- You have send to many requests.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.
php