>_ NicAPI Dokumentation

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

Datacenter / PXE-Operationen

GET PXE-Operationen abrufen API v1

GET https://connect.nicapi.eu/api/v1/datacenter/pxeoperations
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
PXE_OPERATIONS_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/pxeoperations"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

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

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

POST PXE-Operation erstellen API v1

POST https://connect.nicapi.eu/api/v1/datacenter/pxeoperations/create
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
PXE_OPERATIONS_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“.
address Optional Identifikator: IP-Adresse Identifikator (address_plain) des Objekts „Address“.
mac_address Pflicht Text
action Pflicht Auswahl
changePassword diskExtend resetNetwork initRescue
password Optional Text
is_raid Pflicht Boolean (true/false)
network_name Optional Text
nur Buchstaben und Ziffern
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 '{
         "mac_address": "text",
         "action": "changePassword",
         "is_raid": true
     }' \
  "https://connect.nicapi.eu/api/v1/datacenter/pxeoperations/create"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::post("datacenter/pxeoperations/create", [
    'mac_address' => 'text',
    'action' => 'changePassword',
    'is_raid' => true,
]);

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

GET Einzelne PXE-Operation abrufen API v1

GET https://connect.nicapi.eu/api/v1/datacenter/pxeoperations/{pxe_operation_id}
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
PXE_OPERATIONS_LIST

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
pxe_operation_id Pflicht Identifikator: PXE-Operation Identifikator (id) des Objekts „Pxe Operation“, 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/pxeoperations/{pxe_operation_id}"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::get("datacenter/pxeoperations/{pxe_operation_id}");

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

POST PXE-Operation abbrechen API v1

POST https://connect.nicapi.eu/api/v1/datacenter/pxeoperations/{pxe_operation_id}/cancel
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
PXE_OPERATIONS_CRUD

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
pxe_operation_id Pflicht Identifikator: PXE-Operation Identifikator (id) des Objekts „Pxe Operation“, 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/pxeoperations/{pxe_operation_id}/cancel"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::post("datacenter/pxeoperations/{pxe_operation_id}/cancel");

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