>_ NicAPI Dokumentation

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

Cloud / Server

GET Servers: Auflisten API v2

GET https://connect.nicapi.eu/api/v2/cloud/servers
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

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

curl \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  "https://connect.nicapi.eu/api/v2/cloud/servers"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::get("https://connect.nicapi.eu/api/v2/cloud/servers");

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

POST Servers: Anlegen / Ausführen API v2

POST https://connect.nicapi.eu/api/v2/cloud/servers
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

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

Name Pflicht Typ Einschränkungen Beschreibung
project_uuid Pflicht UUID
Objekt muss für den Account zugreifbar sein
title Optional Text
höchstens 150 Zeichen
cores Pflicht Ganzzahl
muss einer buchbaren Konfiguration entsprechen (siehe Preise)
muss für den Kunden buchbar sein
memory Pflicht Ganzzahl
muss einer buchbaren Konfiguration entsprechen (siehe Preise)
muss für den Kunden buchbar sein
template Pflicht Text
password Optional Text
mindestens 6 Zeichen
ssh_keys Optional Liste
ssh_keys[] Optional Text
networks Optional Liste
höchstens 20 Einträge
networks[].vlan_id Optional Ganzzahl
darf leer (null) sein
mindestens 1
networks[].primary_ipv4 Optional IP-Adresse
darf leer (null) sein
networks[].custom_address Optional Text
darf leer (null) sein
IPv4-Netz in CIDR-Schreibweise, z. B. 192.0.2.0/28
networks[].custom_gateway Optional IP-Adresse
darf leer (null) sein
storages Pflicht Liste
mindestens 1 Einträge
storages[].size Pflicht Ganzzahl
muss einer buchbaren Konfiguration entsprechen (siehe Preise)
muss für den Kunden buchbar sein
addresses_specific Optional Liste
commands Optional Liste
pxe Optional Boolean (true/false)
curl \
  -X POST \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "project_uuid": "2f1b6c3e-7d84-4a0b-9c1e-5f3a8b7d2c10",
         "cores": 1,
         "memory": 1,
         "template": "text",
         "storages": [
             {
                 "size": 1
             }
         ]
     }' \
  "https://connect.nicapi.eu/api/v2/cloud/servers"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::post("https://connect.nicapi.eu/api/v2/cloud/servers", [
    'project_uuid' => '2f1b6c3e-7d84-4a0b-9c1e-5f3a8b7d2c10',
    'cores' => 1,
    'memory' => 1,
    'template' => 'text',
    'storages' => [
        [
            'size' => 1,
        ],
    ],
]);

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

GET Servers: Mass Status API v2

GET https://connect.nicapi.eu/api/v2/cloud/servers/massStatus
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

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

curl \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  "https://connect.nicapi.eu/api/v2/cloud/servers/massStatus"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::get("https://connect.nicapi.eu/api/v2/cloud/servers/massStatus");

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

GET Servers: Einzeln abrufen API v2

GET https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, 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/v2/cloud/servers/{cloud_server}"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::get("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}");

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

PUT Servers: Ändern API v2

PUT https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.

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

Name Pflicht Typ Einschränkungen Beschreibung
title Optional Text
darf leer (null) sein
höchstens 255 Zeichen
hostname Optional Text
darf leer (null) sein
höchstens 255 Zeichen
project_uuid Optional Identifikator: Projekt
darf leer (null) sein
Identifikator (uuid) des Objekts „Project“.
curl \
  -X PUT \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "title": "text",
         "hostname": "text",
         "project_uuid": "{project_uuid}"
     }' \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::put("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}", [
    'title' => 'text',
    'hostname' => 'text',
    'project_uuid' => '{project_uuid}',
]);

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

DELETE Servers: Löschen API v2

DELETE https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.

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

curl \
  -X DELETE \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::delete("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}");

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

GET Servers: Backups API v2

GET https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/backups
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, 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/v2/cloud/servers/{cloud_server}/backups"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::get("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/backups");

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

POST Servers: Backups API v2

POST https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/backups
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.

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

Name Pflicht Typ Einschränkungen Beschreibung
title Optional Text
höchstens 255 Zeichen
mode Optional Auswahl
snapshot suspend stop
curl \
  -X POST \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "title": "text",
         "mode": "snapshot"
     }' \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/backups"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::post("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/backups", [
    'title' => 'text',
    'mode' => 'snapshot',
]);

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

DELETE Servers: Backups API v2

DELETE https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/backups/{cloud_server_backup}
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.
cloud_server_backup Pflicht Identifikator: Cloud-Server-Backup Identifikator (id) des Objekts „Cloud Server Backup“, Teil des Pfads.

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

curl \
  -X DELETE \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/backups/{cloud_server_backup}"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::delete("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/backups/{cloud_server_backup}");

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

GET Servers: Firewall Rules API v2

GET https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/firewall/rules
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, 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/v2/cloud/servers/{cloud_server}/firewall/rules"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::get("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/firewall/rules");

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

POST Servers: Firewall Rules API v2

POST https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/firewall/rules
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.

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

Name Pflicht Typ Einschränkungen Beschreibung
title Pflicht Text
höchstens 255 Zeichen
order Pflicht Ganzzahl
mindestens 0
linked_rule_set_id Bedingt Ganzzahl
Pflicht, wenn direction, action fehlt
mindestens 1
direction Bedingt Auswahl
IN OUT
Pflicht, wenn linked_rule_set_id fehlt
action Bedingt Auswahl
ACCEPT DROP REJECT
Pflicht, wenn linked_rule_set_id fehlt
interface Optional Text
darf leer (null) sein
höchstens 255 Zeichen
protocol Optional Text
darf leer (null) sein
höchstens 255 Zeichen
source_address Optional Text
darf leer (null) sein
source_address_set_id Optional Ganzzahl
source_port Optional Text
darf leer (null) sein
destination_address Optional Text
darf leer (null) sein
destination_address_set_id Optional Ganzzahl
destination_port Optional Text
darf leer (null) sein
curl \
  -X POST \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "title": "text",
         "order": 1,
         "linked_rule_set_id": 1,
         "direction": "IN",
         "action": "ACCEPT"
     }' \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/firewall/rules"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::post("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/firewall/rules", [
    'title' => 'text',
    'order' => 1,
    'linked_rule_set_id' => 1,
    'direction' => 'IN',
    'action' => 'ACCEPT',
]);

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

GET Servers: Firewall Rules API v2

GET https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/firewall/rules/{firewall_rule}
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.
firewall_rule Pflicht Identifikator: Firewall-Regel Identifikator (id) des Objekts „Firewall Rule“, 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/v2/cloud/servers/{cloud_server}/firewall/rules/{firewall_rule}"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::get("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/firewall/rules/{firewall_rule}");

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

PUT Servers: Firewall Rules API v2

PUT https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/firewall/rules/{firewall_rule}
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.
firewall_rule Pflicht Identifikator: Firewall-Regel Identifikator (id) des Objekts „Firewall Rule“, Teil des Pfads.

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

Name Pflicht Typ Einschränkungen Beschreibung
title Optional Text
höchstens 255 Zeichen
order Optional Ganzzahl
mindestens 0
linked_rule_set_id Optional Ganzzahl
mindestens 1
direction Optional Auswahl
IN OUT
action Optional Auswahl
ACCEPT DROP REJECT
interface Optional Text
darf leer (null) sein
höchstens 255 Zeichen
protocol Optional Text
darf leer (null) sein
höchstens 255 Zeichen
source_address Optional Text
darf leer (null) sein
source_address_set_id Optional Ganzzahl
source_port Optional Text
darf leer (null) sein
destination_address Optional Text
darf leer (null) sein
destination_address_set_id Optional Ganzzahl
destination_port Optional Text
darf leer (null) sein
curl \
  -X PUT \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "title": "text",
         "order": 1,
         "linked_rule_set_id": 1,
         "direction": "IN",
         "action": "ACCEPT",
         "interface": "text",
         "protocol": "text",
         "source_address": "text",
         "source_address_set_id": 1,
         "source_port": "text",
         "destination_address": "text",
         "destination_address_set_id": 1,
         "destination_port": "text"
     }' \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/firewall/rules/{firewall_rule}"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::put("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/firewall/rules/{firewall_rule}", [
    'title' => 'text',
    'order' => 1,
    'linked_rule_set_id' => 1,
    'direction' => 'IN',
    'action' => 'ACCEPT',
    'interface' => 'text',
    'protocol' => 'text',
    'source_address' => 'text',
    'source_address_set_id' => 1,
    'source_port' => 'text',
    'destination_address' => 'text',
    'destination_address_set_id' => 1,
    'destination_port' => 'text',
]);

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

DELETE Servers: Firewall Rules API v2

DELETE https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/firewall/rules/{firewall_rule}
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.
firewall_rule Pflicht Identifikator: Firewall-Regel Identifikator (id) des Objekts „Firewall Rule“, Teil des Pfads.

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

curl \
  -X DELETE \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/firewall/rules/{firewall_rule}"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::delete("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/firewall/rules/{firewall_rule}");

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

GET Servers: Interfaces API v2

GET https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/interfaces
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
VSERVER_NETWORKS_LIST

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, 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/v2/cloud/servers/{cloud_server}/interfaces"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::get("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/interfaces");

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

POST Servers: Interfaces API v2

POST https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/interfaces
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
VSERVER_NETWORKS_LIST · VSERVER_NETWORKS_CRUD

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.

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

Name Pflicht Typ Einschränkungen Beschreibung
primary_ipv4 Optional IP-Adresse
darf leer (null) sein
ipv4 Optional Liste
ipv4[] Optional IP-Adresse
custom_address Optional Text
darf leer (null) sein
IPv4-Netz in CIDR-Schreibweise, z. B. 192.0.2.0/28
custom_gateway Optional IP-Adresse
darf leer (null) sein
vlan_id Optional Identifikator: Netzwerk (VLAN)
darf leer (null) sein
mindestens 1
Identifikator (id) des Objekts „Network“.
curl \
  -X POST \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "primary_ipv4": "192.0.2.1",
         "ipv4": [
             "192.0.2.1"
         ],
         "custom_address": "text",
         "custom_gateway": "192.0.2.1",
         "vlan_id": "{vlan_id}"
     }' \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/interfaces"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::post("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/interfaces", [
    'primary_ipv4' => '192.0.2.1',
    'ipv4' => [
        '192.0.2.1',
    ],
    'custom_address' => 'text',
    'custom_gateway' => '192.0.2.1',
    'vlan_id' => '{vlan_id}',
]);

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

GET Servers: Interfaces API v2

GET https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/interfaces/{cloud_server_interface}
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
VSERVER_NETWORKS_LIST · VSERVER_NETWORKS_CRUD

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.
cloud_server_interface Pflicht Identifikator: Cloud-Server-Netzwerkschnittstelle Identifikator (netname) des Objekts „Cloud Server Interface“, 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/v2/cloud/servers/{cloud_server}/interfaces/{cloud_server_interface}"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::get("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/interfaces/{cloud_server_interface}");

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

PUT Servers: Interfaces API v2

PUT https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/interfaces/{cloud_server_interface}
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
VSERVER_NETWORKS_LIST · VSERVER_NETWORKS_CRUD

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.
cloud_server_interface Pflicht Identifikator: Cloud-Server-Netzwerkschnittstelle Identifikator (netname) des Objekts „Cloud Server Interface“, Teil des Pfads.

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

Name Pflicht Typ Einschränkungen Beschreibung
primary_ipv4 Optional IP-Adresse
darf leer (null) sein
ipv4 Optional Liste
ipv4[] Optional IP-Adresse
custom_address Optional Text
darf leer (null) sein
IPv4-Netz in CIDR-Schreibweise, z. B. 192.0.2.0/28
custom_gateway Optional IP-Adresse
darf leer (null) sein
vlan_id Optional Identifikator: Netzwerk (VLAN)
darf leer (null) sein
mindestens 1
Identifikator (id) des Objekts „Network“.
network_id Optional Identifikator: Netzwerk (VLAN)
darf leer (null) sein
mindestens 1
Identifikator (id) des Objekts „Network“.
curl \
  -X PUT \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "primary_ipv4": "192.0.2.1",
         "ipv4": [
             "192.0.2.1"
         ],
         "custom_address": "text",
         "custom_gateway": "192.0.2.1",
         "vlan_id": "{vlan_id}",
         "network_id": "{network_id}"
     }' \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/interfaces/{cloud_server_interface}"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::put("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/interfaces/{cloud_server_interface}", [
    'primary_ipv4' => '192.0.2.1',
    'ipv4' => [
        '192.0.2.1',
    ],
    'custom_address' => 'text',
    'custom_gateway' => '192.0.2.1',
    'vlan_id' => '{vlan_id}',
    'network_id' => '{network_id}',
]);

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

DELETE Servers: Interfaces API v2

DELETE https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/interfaces/{cloud_server_interface}
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
VSERVER_NETWORKS_LIST · VSERVER_NETWORKS_CRUD

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.
cloud_server_interface Pflicht Identifikator: Cloud-Server-Netzwerkschnittstelle Identifikator (netname) des Objekts „Cloud Server Interface“, Teil des Pfads.

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

curl \
  -X DELETE \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/interfaces/{cloud_server_interface}"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::delete("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/interfaces/{cloud_server_interface}");

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

POST generated::QkaYN4Qjzpl5xPe0 API v2

POST https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/restart
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, 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/v2/cloud/servers/{cloud_server}/restart"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::post("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/restart");

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

POST Servers: Restore API v2

POST https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/restore
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.

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

Name Pflicht Typ Einschränkungen Beschreibung
backup_id Pflicht Text
Objekt muss für den Account zugreifbar sein
curl \
  -X POST \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "backup_id": "text"
     }' \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/restore"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::post("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/restore", [
    'backup_id' => 'text',
]);

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

GET Servers: Scheduled Tasks API v2

GET https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/scheduled-tasks
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, 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/v2/cloud/servers/{cloud_server}/scheduled-tasks"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::get("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/scheduled-tasks");

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

POST Servers: Scheduled Tasks API v2

POST https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/scheduled-tasks
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.

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

Name Pflicht Typ Einschränkungen Beschreibung
action Pflicht Auswahl
createBackup backup restart shutdown start
interval Pflicht Text
Intervall: hour, day, week, month oder year
first_execution Optional Datum (YYYY-MM-DD)
nach now
curl \
  -X POST \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "action": "createBackup",
         "interval": "text"
     }' \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/scheduled-tasks"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::post("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/scheduled-tasks", [
    'action' => 'createBackup',
    'interval' => 'text',
]);

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

DELETE Servers: Scheduled Tasks API v2

DELETE https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/scheduled-tasks/{cloud_server_scheduled_task}
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
VSERVER_SCHEDULED_TASKS_CRUD

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.
cloud_server_scheduled_task Pflicht Identifikator: Geplanter Task Identifikator (id) des Objekts „Cloud Server Scheduled Task“, Teil des Pfads.

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

curl \
  -X DELETE \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/scheduled-tasks/{cloud_server_scheduled_task}"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::delete("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/scheduled-tasks/{cloud_server_scheduled_task}");

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

POST generated::0mWlTuWs5diykAGJ API v2

POST https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/shutdown
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, 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/v2/cloud/servers/{cloud_server}/shutdown"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::post("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/shutdown");

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

GET Servers: Snapshots API v2

GET https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/snapshots
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
SNAPSHOTS_CRUD

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, 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/v2/cloud/servers/{cloud_server}/snapshots"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::get("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/snapshots");

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

POST Servers: Snapshots API v2

POST https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/snapshots
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
SNAPSHOTS_CRUD

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.

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

Name Pflicht Typ Einschränkungen Beschreibung
title Pflicht Text
mindestens 2 Zeichen
Format: /^[a-zA-Z][a-zA-Z0-9_]+$/
description Optional Text
curl \
  -X POST \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "title": "text"
     }' \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/snapshots"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::post("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/snapshots", [
    'title' => 'text',
]);

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

GET Servers: Snapshots API v2

GET https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/snapshots/{cloud_server_snapshot}
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
SNAPSHOTS_CRUD

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.
cloud_server_snapshot Pflicht Identifikator: Cloud-Server-Snapshot Identifikator (id) des Objekts „Cloud Server Snapshot“, 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/v2/cloud/servers/{cloud_server}/snapshots/{cloud_server_snapshot}"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::get("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/snapshots/{cloud_server_snapshot}");

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

DELETE Servers: Snapshots API v2

DELETE https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/snapshots/{cloud_server_snapshot}
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
SNAPSHOTS_CRUD

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.
cloud_server_snapshot Pflicht Identifikator: Cloud-Server-Snapshot Identifikator (id) des Objekts „Cloud Server Snapshot“, Teil des Pfads.

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

curl \
  -X DELETE \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/snapshots/{cloud_server_snapshot}"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::delete("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/snapshots/{cloud_server_snapshot}");

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

PUT Servers: Snapshots Rollback API v2

PUT https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/snapshots/{cloud_server_snapshot}/rollback
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
SNAPSHOTS_CRUD

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.
cloud_server_snapshot Pflicht Identifikator: Cloud-Server-Snapshot Identifikator (id) des Objekts „Cloud Server Snapshot“, Teil des Pfads.

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

curl \
  -X PUT \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/snapshots/{cloud_server_snapshot}/rollback"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::put("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/snapshots/{cloud_server_snapshot}/rollback");

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

POST generated::aNb3LXlouO0Ch60n API v2

POST https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/start
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, 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/v2/cloud/servers/{cloud_server}/start"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::post("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/start");

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

POST generated::OBXhxYXUvcM9Thyy API v2

POST https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/stop
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, 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/v2/cloud/servers/{cloud_server}/stop"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::post("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/stop");

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

POST Servers: Storages API v2

POST https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/storages
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
VSERVERS_CRUD

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.

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

Name Pflicht Typ Einschränkungen Beschreibung
size Pflicht Ganzzahl
muss einer buchbaren Konfiguration entsprechen (siehe Preise)
muss für den Kunden buchbar sein
is_boot Optional Boolean (true/false)
curl \
  -X POST \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "size": 1
     }' \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/storages"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::post("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/storages", [
    'size' => 1,
]);

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

PUT Servers: Storages API v2

PUT https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/storages/{cloud_server_storage}
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
VSERVERS_CRUD

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.
cloud_server_storage Pflicht Identifikator: Cloud-Server-Speicher Identifikator (title) des Objekts „Cloud Server Storage“, Teil des Pfads.

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

Name Pflicht Typ Einschränkungen Beschreibung
size Optional Ganzzahl
muss einer buchbaren Konfiguration entsprechen (siehe Preise)
muss für den Kunden buchbar sein
is_boot Optional Boolean (true/false)
curl \
  -X PUT \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "size": 1,
         "is_boot": true
     }' \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/storages/{cloud_server_storage}"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::put("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/storages/{cloud_server_storage}", [
    'size' => 1,
    'is_boot' => true,
]);

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

DELETE Servers: Storages API v2

DELETE https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/storages/{cloud_server_storage}
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
VSERVERS_CRUD

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
cloud_server Pflicht Identifikator: Cloud-Server Identifikator (id) des Objekts „Cloud Server“, Teil des Pfads.
cloud_server_storage Pflicht Identifikator: Cloud-Server-Speicher Identifikator (title) des Objekts „Cloud Server Storage“, Teil des Pfads.

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

curl \
  -X DELETE \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  "https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/storages/{cloud_server_storage}"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::delete("https://connect.nicapi.eu/api/v2/cloud/servers/{cloud_server}/storages/{cloud_server_storage}");

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