>_ NicAPI Dokumentation

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

Cloud / Netzwerke

GET Networks: Auflisten API v2

GET https://connect.nicapi.eu/api/v2/cloud/networks
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
VLANS_LIST

Request-Parameter Werden als Query-Parameter übergeben.

Name Pflicht Typ Einschränkungen Beschreibung
tag Optional Ganzzahl
mindestens 1
höchstens 4093
is_public Optional Boolean (true/false)
title Optional Text
höchstens 255 Zeichen
curl \
  -H "Authorization: Bearer IHR_API_TOKEN" \
  "https://connect.nicapi.eu/api/v2/cloud/networks?tag=1&is_public=true&title=text"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::get("https://connect.nicapi.eu/api/v2/cloud/networks", [
    'tag' => 1,
    'is_public' => true,
    'title' => 'text',
]);

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

POST Networks: Anlegen / Ausführen API v2

POST https://connect.nicapi.eu/api/v2/cloud/networks
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
VLANS_LIST

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

Name Pflicht Typ Einschränkungen Beschreibung
tag Optional Ganzzahl
mindestens 1
höchstens 4093
is_public Optional Boolean (true/false)
title Optional Text
höchstens 255 Zeichen
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 '{
         "tag": 1,
         "is_public": true,
         "title": "text",
         "project_uuid": "{project_uuid}"
     }' \
  "https://connect.nicapi.eu/api/v2/cloud/networks"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

$result = NicAPI::post("https://connect.nicapi.eu/api/v2/cloud/networks", [
    'tag' => 1,
    'is_public' => true,
    'title' => 'text',
    'project_uuid' => '{project_uuid}',
]);

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

GET Networks: Addresses API v2

GET https://connect.nicapi.eu/api/v2/cloud/networks/{network}/addresses
Authentifizierung
API-Token erforderlich (Authorization: Bearer … oder Parameter authToken)
Benötigte Rechte
VLANS_LIST

Pfad-Parameter Werden direkt in die URL eingesetzt.

Name Pflicht Typ Einschränkungen Beschreibung
network Pflicht Identifikator: Netzwerk (VLAN) Identifikator (id) des Objekts „Network“, 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/networks/{network}/addresses"
use NicAPI\NicAPI;

NicAPI::init("IHR_API_TOKEN");

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

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