>_ NicAPI Dokumentation

REST-API von LUMASERV: Domains, DNS, SSL, Cloud-Server, IP-Adressen, Abrechnung und mehr.

Datacenter / PXE-Installationen

GET PXE-Installationen abrufen API v1

GET https://connect.nicapi.eu/api/v1/datacenter/pxeinstallations

Gibt die zugewiesenen PXE-Installationen zurück.

Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
PXE_INSTALLATIONS_LIST

Dieser Endpunkt benötigt neben der Authentifizierung keine weiteren Request-Parameter.

curl \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  "https://connect.nicapi.eu/api/v1/datacenter/pxeinstallations"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::get("datacenter/pxeinstallations");

if (NicAPI::wasSuccess()) {
    $data = $result->data;
}

POST PXE-Installation erstellen API v1

POST https://connect.nicapi.eu/api/v1/datacenter/pxeinstallations/create

Erstellt eine neue PXE-Installation.

Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
PXE_INSTALLATIONS_CRUD

Request-Parameter Werden im Request-Body übergeben (JSON oder Formular-Felder).

Name Pflicht Typ Einschränkungen Beschreibung
user Optional Identifikator: Benutzer Identifikator (username) des Objekts „User“.
vserver_template Pflicht Text
address Pflicht Identifikator: IP-Adresse Identifikator (address_plain) des Objekts „Address“.
mac_address Pflicht Text
hostname Pflicht Text
password Pflicht Text
support_ssh_key Optional Boolean (true/false)
raid_level Optional Auswahl
darf leer (null) sein
RAID0 RAID1 RAID5
raid_disk_count Bedingt Ganzzahl
darf leer (null) sein
Pflicht, wenn raid_level angegeben wird
mindestens 1
network_name Optional Text
nur Buchstaben und Ziffern
commands Optional Liste Befehle, die nach der Installation auf dem neu installierten Server ausgeführt werden sollen.
project_uuid Optional Identifikator: Projekt
darf leer (null) sein
Identifikator (uuid) des Objekts „Project“.
curl \
  -X POST \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "vserver_template": "text",
         "address": "{address}",
         "mac_address": "text",
         "hostname": "text",
         "password": "text",
         "raid_disk_count": 1
     }' \
  "https://connect.nicapi.eu/api/v1/datacenter/pxeinstallations/create"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::post("datacenter/pxeinstallations/create", [
    'vserver_template' => 'text',
    'address' => '{address}',
    'mac_address' => 'text',
    'hostname' => 'text',
    'password' => 'text',
    'raid_disk_count' => 1,
]);

if (NicAPI::wasSuccess()) {
    $data = $result->data;
}

GET Templates abrufen API v1

GET https://connect.nicapi.eu/api/v1/datacenter/pxeinstallations/templates

Gibt alle möglichen Templates für PXE-Installationen zurück.

Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
PXE_INSTALLATIONS_LIST

Dieser Endpunkt benötigt neben der Authentifizierung keine weiteren Request-Parameter.

curl \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  "https://connect.nicapi.eu/api/v1/datacenter/pxeinstallations/templates"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::get("datacenter/pxeinstallations/templates");

if (NicAPI::wasSuccess()) {
    $data = $result->data;
}

GET Einzelne Installation abrufen API v1

GET https://connect.nicapi.eu/api/v1/datacenter/pxeinstallations/{pxe_installation_id}

Gibt Informationen zu einer einzelnen PXE-Installation zurück.

Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
PXE_INSTALLATIONS_LIST

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
pxe_installation_id Pflicht Identifikator: PXE-Installation Identifikator (id) des Objekts „Pxe Installation“, Teil des Pfads.

Dieser Endpunkt benötigt neben der Authentifizierung keine weiteren Request-Parameter.

curl \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  "https://connect.nicapi.eu/api/v1/datacenter/pxeinstallations/{pxe_installation_id}"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::get("datacenter/pxeinstallations/{pxe_installation_id}");

if (NicAPI::wasSuccess()) {
    $data = $result->data;
}

POST PXE-Installation abbrechen API v1

POST https://connect.nicapi.eu/api/v1/datacenter/pxeinstallations/{pxe_installation_id}/cancel

Bricht eine einzelne PXE-Installation ab.

Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
PXE_INSTALLATIONS_CRUD

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
pxe_installation_id Pflicht Identifikator: PXE-Installation Identifikator (id) des Objekts „Pxe Installation“, Teil des Pfads.

Dieser Endpunkt benötigt neben der Authentifizierung keine weiteren Request-Parameter.

curl \
  -X POST \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  "https://connect.nicapi.eu/api/v1/datacenter/pxeinstallations/{pxe_installation_id}/cancel"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::post("datacenter/pxeinstallations/{pxe_installation_id}/cancel");

if (NicAPI::wasSuccess()) {
    $data = $result->data;
}