API Dokumentation

Vollständige REST API für Cloud Server, Dedicated Server und mehr. Alle Endpoints auf einen Blick — mit Beispielen in cURL, JavaScript und PHP.

Automatisch übersetzt

Base URL https://reseller.hosterapi.de/api/v1

Authentifizierung

Alle Requests benötigen einen Bearer Token im Authorization Header.

Format

Request Body als JSON. Header: Accept: application/json und Content-Type: application/json.

Responses

Erfolg: {"result": ...} Fehler: {"error": "..."}

Cloud Server

34 Endpoints
GET /datacenter/server/{sid}/status Aktuellen VM-Status abfragen Auth

(Laufstatus, CPU-Auslastung, RAM, etc.)

URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/status" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/status", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/status', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": {
        "cpu": 0,
        "mem": 455467008,
        "memfree": 577208320,
        "netin": 52240,
        "netout": 47492,
        "uptime": 1164,
        "state": "running"
    }
}
GET /datacenter/server/{sid}/traffic Get traffic statistics for a VM Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Query-Parameter
ParameterTypStatusBeschreibung
period string optional Period: day, week, month. Default: month
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/traffic?period=month" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/traffic", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/traffic', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
GET /datacenter/server/{sid}/config Aktuelle VM-Konfiguration abfragen Auth

(CPU-Auslastung, RAM, etc.)

URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Query-Parameter
ParameterTypStatusBeschreibung
include string optional Optional. Pass `network` to include per-IP network parameters (gateway, netmask/prefix).
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/config?include=network" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/config", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/config', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": {
        "cpuCores": 2,
        "mem": 2048,
        "disk": "100G",
        "ips": [
            "127.0.0.1",
            "fe80::1"
        ],
        "template": "Ubuntu20.04",
        "iso": null
    }
}
GET /datacenter/server/{sid}/software Installierte Software auf der VM abfragen Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/software" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/software", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/software', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": [
        {
            "id": 2,
            "status": "installing",
            "package": "mc",
            "version": "1",
            "output": null,
            "ip": "127.0.0.1",
            "created_at": ""
        }
    ]
}
GET /datacenter/server/{sid}/incidents Incidents abfragen Auth

Gibt alle Netzwerk-Incidents dieser VM zurück (DDoS-Angriffe, verdächtige Netzwerkaktivität, etc.)

URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/incidents" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/incidents", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/incidents', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "response": [
        {
            "gid": 117896,
            "start": "2021-02-22 18:50:33",
            "stop": "2021-02-22 18:50:33",
            "host": "203.0.113.10",
            "direction": 1,
            "impact": 90107632,
            "types": [
                "NTP Amplification",
                "DNS Amplification"
            ],
            "ongoing": 0
        },
        {
            "gid": 215486,
            "start": "2021-02-22 18:50:33",
            "stop": "2021-02-22 18:50:33",
            "host": "203.0.113.10",
            "direction": 1,
            "impact": 90107632,
            "types": [
                "NTP Amplification",
                "DNS Amplification"
            ],
            "ongoing": 0
        }
    ],
    "error": false
}
GET /datacenter/server/{sid}/console noVNC Konsolen-URL abfragen Auth

Diese Funktion gibt eine URL zu einer einbettbaren noVNC-Konsole zurück. Die URL kann in einem iframe eingebettet werden. **Achtung:** Die URL muss innerhalb von **10 Sekunden** nach dem Request aufgerufen werden, da sonst das VNC-Ticket abläuft.

URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/console" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/console", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/console', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": "https:\/\/console.example.com\/novnc\/vnc.html?host=console.example.com&password=VNCTICKET-PLACEHOLDER&path=novnc%2Fproxy%2F1%2F100%2F%3Fport%3D5900%26vncticket%3DVNCTICKET-PLACEHOLDER"
}
POST /datacenter/server/{sid}/delete VM löschen Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Query-Parameter
ParameterTypStatusBeschreibung
async bool optional Pass async=1 to run deletion as background job and get a jobId back
Body-Parameter
ParameterTypStatusBeschreibung
force bool optional Force delete vm, even if running
Beispiel
curl -X POST "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/delete" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"force":true}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/delete", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "force": true
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->post('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/delete', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'force' => true,
    ],
]);
POST /datacenter/server/{sid}/rdns Server RDNS setzen Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Body-Parameter
ParameterTypStatusBeschreibung
ip string required IP to set RDNS for (IPv4 only)
hostname string required RDNS FQDN
Beispiel
curl -X POST "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/rdns" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"ip":"value","hostname":"value"}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/rdns", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "ip": "value",
    "hostname": "value"
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->post('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/rdns', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'ip' => 'value',
        'hostname' => 'value',
    ],
]);
Response
{
    "result": true
}
PUT /datacenter/server/{sid}/name Set friendly name for VM Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Body-Parameter
ParameterTypStatusBeschreibung
name string required Friendly name for the VM (max 50 chars)
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/name" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"name":"value"}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/name", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "name": "value"
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/name', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'name' => 'value',
    ],
]);
GET /datacenter/server/{sid}/name Get friendly name for VM Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/name" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/name", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/name', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
PUT /datacenter/server/{sid}/change VM Up-/Downgrade Auth

**Bitte beachte, dass ein IP-Downgrade derzeit nicht unterstützt wird. Versuche werden stillschweigend ignoriert**.

URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Body-Parameter
ParameterTypStatusBeschreibung
cpuCores int optional Number of CPU cores
mem int optional Memory size in MB
disk string optional Root disk size **Note: Downgrading disk size is not allowed due to possible data loss**
ipCount int optional Number of IPs to assign
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/change" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"cpuCores":1,"mem":1,"disk":"value","ipCount":1}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/change", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "cpuCores": 1,
    "mem": 1,
    "disk": "value",
    "ipCount": 1
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/change', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'cpuCores' => 1,
        'mem' => 1,
        'disk' => 'value',
        'ipCount' => 1,
    ],
]);
PUT /datacenter/server/{sid}/start VM starten Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/start" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/start", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/start', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}
PUT /datacenter/server/{sid}/shutdown VM herunterfahren Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/shutdown" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/shutdown", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/shutdown', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}
PUT /datacenter/server/{sid}/stop VM erzwungen stoppen Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/stop" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/stop", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/stop', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}
PUT /datacenter/server/{sid}/reboot VM neustarten Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/reboot" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/reboot", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/reboot', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}
PUT /datacenter/server/{sid}/reset VM erzwungen neustarten Auth

**Achtung: Dieser Befehl beendet alle laufenden Aufgaben und erzwingt einen Neustart der VM**.

URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/reset" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/reset", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/reset', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}
PUT /datacenter/server/{sid}/reboot/force VM erzwungen neustarten Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/reboot/force" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/reboot/force", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/reboot/force', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}
PUT /datacenter/server/{sid}/reinstall VM reinstallieren Auth

VM wird mit der ursprünglichen Konfiguration (inkl. OS) reinstalliert. Einen Template-Namen angeben, um die automatische Auswahl zu überschreiben.

URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Body-Parameter
ParameterTypStatusBeschreibung
template string optional Template to use (overrides automatic selection)
hostname int optional custom hostname, min 4 characters
sshKey string optional SSH public key to inject via Cloud-Init (overrides stored key)
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/reinstall" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"template":"value","hostname":1,"sshKey":"value"}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/reinstall", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "template": "value",
    "hostname": 1,
    "sshKey": "value"
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/reinstall', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'template' => 'value',
        'hostname' => 1,
        'sshKey' => 'value',
    ],
]);
Response
{
    "result": {
        "status": "queued",
        "jobId": 15,
        "progress": 0
    }
}
PUT /datacenter/server/{sid}/password/reset Root-Passwort zurücksetzen Auth

Ein neues Passwort wird automatisch generiert und bei Erfolg zurückgegeben. Mit dem Parameter "password" kann ein eigenes Passwort gesetzt werden

URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Body-Parameter
ParameterTypStatusBeschreibung
password string optional password, minimum 6 characters
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/password/reset" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"password":"value"}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/password/reset", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "password": "value"
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/password/reset', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'password' => 'value',
    ],
]);
Response
{
    "result": {
        "status": "success",
        "password": "{password}"
    }
}
POST /datacenter/server/{sid}/firewall/outgoing_mails Ausgehende Mail-Firewall-Regel aktualisieren Auth

Dieser Endpoint ermöglicht das Aktivieren oder Deaktivieren der Firewall-Regeln für ausgehende E-Mails. Standardmäßig werden alle Server mit blockierten Ports für ausgehende E-Mails erstellt, um Spam und Missbrauch zu verhindern. Mit diesem Endpoint kann die Regel aktiviert oder deaktiviert werden, sofern die entsprechende Berechtigung vorliegt. Andernfalls kann der Support kontaktiert werden, um Zugang zu erhalten.

Body-Parameter
ParameterTypStatusBeschreibung
deny boolean required Set to true to block outgoing mail ports, false to unblock them.
Beispiel
curl -X POST "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/outgoing_mails" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"deny":true}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/outgoing_mails", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "deny": true
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->post('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/outgoing_mails', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'deny' => true,
    ],
]);
GET /datacenter/server/{sid}/backups/list Backups auflisten Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/backups/list" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/backups/list", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/backups/list', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": [
        1606685300,
        1606585800,
        1606575200
    ]
}
GET /datacenter/server/{sid}/backups/status Backup-Status abfragen Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/backups/status" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/backups/status", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/backups/status', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
PUT /datacenter/server/{sid}/backups/create Backup erstellen Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/backups/create" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/backups/create", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/backups/create', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}
POST /datacenter/server/{sid}/backups/restore VM aus Backup wiederherstellen Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Body-Parameter
ParameterTypStatusBeschreibung
backup int required Backup to restore (unix timestamp)
Beispiel
curl -X POST "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/backups/restore" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"backup":1}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/backups/restore", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "backup": 1
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->post('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/backups/restore', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'backup' => 1,
    ],
]);
Response
{
    "result": "pending"
}
POST /datacenter/server/{sid}/backups/delete Backup löschen Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Body-Parameter
ParameterTypStatusBeschreibung
backup int required Backup to delete (unix timestamp)
Beispiel
curl -X POST "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/backups/delete" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"backup":1}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/backups/delete", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "backup": 1
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->post('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/backups/delete', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'backup' => 1,
    ],
]);
Response
{
    "result": true
}
GET /datacenter/server/{sid}/iso Verfügbare ISOs auflisten Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/iso" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/iso", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/iso', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": [
        {
            "id": "ISOs:iso\/debian-11.5.0-amd64-netinst-0.iso",
            "name": "debian-11.5.0-amd64-netinst.iso"
        }
    ]
}
POST /datacenter/server/{sid}/iso ISO einlegen Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Body-Parameter
ParameterTypStatusBeschreibung
isoId string required ISO ID to insert
Beispiel
curl -X POST "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/iso" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"isoId":"value"}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/iso", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "isoId": "value"
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->post('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/iso', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'isoId' => 'value',
    ],
]);
Response
{
    "result": true,
    "rebooted": true
}
DELETE /datacenter/server/{sid}/iso ISO entfernen Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X DELETE "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/iso" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/iso", {
  method: "DELETE",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->delete('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/iso', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}
GET /datacenter/server/{sid}/scheduled Geplante Aufgaben auflisten Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/scheduled" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/scheduled", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/scheduled', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": [
        {
            "id": 1,
            "interval": "DAILY",
            "command": "BACKUP",
            "execution_last": null,
            "execution_next": "2022-07-13T15:35:48.000000Z"
        }
    ]
}
POST /datacenter/server/{sid}/scheduled Geplante Aufgabe erstellen Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Body-Parameter
ParameterTypStatusBeschreibung
command required optional command to execute, available 'RESTART','BACKUP','SHUTDOWN','START'
interval required optional interval, available 'DAILY','TWODAYS','THREEDAYS','WEEKLY','TWOWEEKS','MONTHLY','TWOMONTHS','THREEMONTHS'
Beispiel
curl -X POST "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/scheduled" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"command":"value","interval":"value"}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/scheduled", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "command": "value",
    "interval": "value"
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->post('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/scheduled', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'command' => 'value',
        'interval' => 'value',
    ],
]);
Response
{
    "result": true
}
DELETE /datacenter/server/{sid}/scheduled/{VMScheduledTask} Geplante Aufgabe löschen Auth
Beispiel
curl -X DELETE "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/scheduled/{VMScheduledTask}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/scheduled/{VMScheduledTask}", {
  method: "DELETE",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->delete('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/scheduled/{VMScheduledTask}', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}
POST /datacenter/server Neuen Server erstellen Auth
Body-Parameter
ParameterTypStatusBeschreibung
location string optional Location ID
template string required OS Template Name
cpuCores int required Number of CPU cores
mem int required Memory size in MB
disk string required Root disk size
ipCount int required Number of IPs to assign
hostname string optional custom hostname, min 4 characters
sshKey string optional custom ssh public key - if the key is invalid it will be ignored during installation
Beispiel
curl -X POST "https://reseller.hosterapi.de/api/v1/datacenter/server" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"location":"value","template":"value","cpuCores":1,"mem":1,"disk":"value","ipCount":1,"hostname":"value","sshKey":"value"}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "location": "value",
    "template": "value",
    "cpuCores": 1,
    "mem": 1,
    "disk": "value",
    "ipCount": 1,
    "hostname": "value",
    "sshKey": "value"
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->post('https://reseller.hosterapi.de/api/v1/datacenter/server', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'location' => 'value',
        'template' => 'value',
        'cpuCores' => 1,
        'mem' => 1,
        'disk' => 'value',
        'ipCount' => 1,
        'hostname' => 'value',
        'sshKey' => 'value',
    ],
]);
Response
{
    "result": {
        "status": "queued",
        "jobId": 15,
        "progress": 0
    }
}
GET /datacenter/server Alle Server auflisten Auth

Pass `?include=name` to get SID + name objects instead of plain SIDs.

Query-Parameter
ParameterTypStatusBeschreibung
include string optional Optional. Pass `name` to include VM names.
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/server?include=name" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/server', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": [
        4001,
        4002,
        4003
    ]
}
GET /datacenter/templates Verfügbare Templates abfragen Auth
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/templates" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/templates", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/templates', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": [
        "Debian10.0"
    ]
}

Dedicated Server

20 Endpoints
GET /datacenter/dedicated/market Dedicated Server Marktplatz Auth
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/market" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/market", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/market', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": [
        {
            "id": 9,
            "model": "HP ProLiant BL460c G8",
            "description": "",
            "configuration": {
                "cpu": {
                    "type": "Intel Xeon E5-2609 v2",
                    "count": "1"
                },
                "ram": {
                    "type": "DDR3 ECC",
                    "size": "32"
                },
                "storage": {
                    "type": "SSD",
                    "count": "2",
                    "size": "250"
                },
                "price": 39,
                "location": {
                    "id": 2,
                    "name": "Maincubes, Frankfurt"
                }
            }
        },
        {
            "id": 84,
            "model": "Generic",
            "description": null,
            "configuration": {
                "cpu": {
                    "type": "AMD Ryzen 7 3800X",
                    "count": "1"
                },
                "ram": {
                    "type": "DDR4 ECC",
                    "size": "32 GB DDR4 ECC"
                },
                "storage": {
                    "type": "NVMe",
                    "count": "2",
                    "size": "256"
                },
                "price": 139,
                "location": {
                    "id": 1,
                    "name": "Maincubes, Frankfurt"
                }
            }
        }
    ]
}
POST /datacenter/dedicated/order Dedicated Server bestellen Auth
Body-Parameter
ParameterTypStatusBeschreibung
id int required Server ID to order
template string required Template to install
hostname string required Server Hostname
Beispiel
curl -X POST "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/order" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"id":1,"template":"value","hostname":"value"}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/order", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "id": 1,
    "template": "value",
    "hostname": "value"
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->post('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/order', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'id' => 1,
        'template' => 'value',
        'hostname' => 'value',
    ],
]);
Response
{
    "result": true
}
POST /datacenter/dedicated/order/byod Build your own dedicated server Auth

Dieser Endpoint bestellt einen dedizierten Server. Die Antwort enthält eine Bestellnummer, die über die API geprüft werden muss, um nach Fertigstellung die Geräte-ID zu erhalten. Note: Bestellungen können **bis zu 48 Stunden** dauern!

Body-Parameter
ParameterTypStatusBeschreibung
parts array required Parts to be in the server
parts[cpu] int required CPU part to be in the server
parts[ram] int required RAM part to be in the server
parts[ssd] int optional SSD part to be in the server
parts[hdd] int optional HDD part to be in the server
template string required Template to install
ipCount string optional IP Count
hostname string optional Server Hostname
Beispiel
curl -X POST "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/order/byod" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"parts":[],"parts[cpu]":1,"parts[ram]":1,"parts[ssd]":1,"parts[hdd]":1,"template":"value","ipCount":"value","hostname":"value"}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/order/byod", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "parts": [],
    "parts[cpu]": 1,
    "parts[ram]": 1,
    "parts[ssd]": 1,
    "parts[hdd]": 1,
    "template": "value",
    "ipCount": "value",
    "hostname": "value"
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->post('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/order/byod', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'parts' => [
        ],
        'parts[cpu]' => 1,
        'parts[ram]' => 1,
        'parts[ssd]' => 1,
        'parts[hdd]' => 1,
        'template' => 'value',
        'ipCount' => 'value',
        'hostname' => 'value',
    ],
]);
Response
{
    "result": 103
}
GET /datacenter/dedicated/order/byod/status/{id} Check BYOD order status Auth
URL-Parameter
ParameterStatusBeschreibung
id required int Order number
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/order/byod/status/{id}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/order/byod/status/{id}", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/order/byod/status/{id}', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
GET /datacenter/dedicated/templates Verfügbare Templates abfragen Auth
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/templates" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/templates", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/templates', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": [
        "CentOS 7 (latest) (DE)",
        "Debian 8 Jessie (DE)",
        "Debian 9 Stretch (DE)",
        "Ubuntu 16.04 LTS",
        "Ubuntu 18.04 LTS (DE)",
        "OpenSuse 42.3",
        "VMware ESXi 6.5 U1",
        "VMware ESXi 6.5 U2",
        "Debian 10 Buster (DE)",
        "Proxmox VE 6 (DE)",
        "Debian 10 Buster - Software RAID (DE)",
        "[COPY] Debian 10 Buster - Software RAID (DE) Test",
        "CentOS 7 (latest)",
        "Debian Jessie",
        "Debian Stretch",
        "Ubuntu 16.04 LTS",
        "Ubuntu 18.04 LTS",
        "OpenSuse 42.3",
        "VMware ESXi 6.5 U1",
        "VMware ESXi 6.5 U2",
        "Debian Buster",
        "Proxmox VE 6",
        "Ubuntu 20.04 LTS"
    ]
}
GET /datacenter/dedicated Server auflisten Auth

Falls eine erwartete ID nicht vorhanden ist, gab es wahrscheinlich ein Problem bei der Bestellung. Dies muss mit einer eigenen Bestellverfolgung abgefangen werden.

Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/dedicated" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/dedicated', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": [
        {
            "id": 9,
            "orderComplete": false
        }
    ]
}
PUT /datacenter/dedicated/{sid}/start Dedicated Server starten Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/start" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/start", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/start', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}
PUT /datacenter/dedicated/{sid}/shutdown Dedicated Server stoppen Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/shutdown" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/shutdown", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/shutdown', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}
PUT /datacenter/dedicated/{sid}/reboot Dedicated Server neustarten Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/reboot" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/reboot", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/reboot', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}
PUT /datacenter/dedicated/{sid}/reinstall Server reinstallieren Auth
Body-Parameter
ParameterTypStatusBeschreibung
template string required Template to install
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/reinstall" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"template":"value"}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/reinstall", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "template": "value"
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/reinstall', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'template' => 'value',
    ],
]);
Response
{
    "result": true
}
GET /datacenter/dedicated/{sid}/console noVNC Konsole öffnen Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/console" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/console", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/console', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": "https:\/\/example.com\/novnc\/vnc.html"
}
PUT /datacenter/dedicated/{sid}/pdu/cycle PDU cold boot (power cycle) a dedicated server Auth
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/pdu/cycle" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/pdu/cycle", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/pdu/cycle', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}
PUT /datacenter/dedicated/{sid}/pdu/on PDU power on a dedicated server Auth
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/pdu/on" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/pdu/on", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/pdu/on', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}
PUT /datacenter/dedicated/{sid}/pdu/off PDU power off a dedicated server Auth
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/pdu/off" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/pdu/off", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/pdu/off', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}
GET /datacenter/dedicated/{sid}/pdu/status Get PDU outlet status for a dedicated server Auth
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/pdu/status" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/pdu/status", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/pdu/status', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": "powered"
}
GET /datacenter/dedicated/{sid}/status Server-Status abfragen Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/status" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/status", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/status', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": {
        "orderId": 324,
        "traffic": 0,
        "netin": 0,
        "netout": 0,
        "uptime": 0,
        "state": "halted",
        "status": "offline"
    }
}
GET /datacenter/dedicated/{sid}/config Server-Konfiguration abfragen Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/config" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/config", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/config', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": {
        "ssh": {
            "root": {
                "password": "UOosKBueLhn8"
            },
            "user": {
                "username": "user",
                "password": "UOosKBueLhn8"
            }
        },
        "ips": [
            "92.246.85.200"
        ],
        "template": "Debian Jessie",
        "configuration": {
            "cpu": {
                "type": "Intel Xeon E5-2609 v1",
                "count": "1"
            },
            "ram": {
                "size": "16",
                "type": "DDR3 ECC"
            },
            "price": 0,
            "storage": {
                "size": "240",
                "type": "SSD",
                "count": "2"
            },
            "location": {
                "id": 2,
                "name": "SkyLink, Eygelshoven"
            }
        }
    }
}
PUT /datacenter/dedicated/{sid}/rdns Server RDNS setzen Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Body-Parameter
ParameterTypStatusBeschreibung
ip string required IP to set RDNS for (IPv4 only)
hostname string required RDNS FQDN
Beispiel
curl -X PUT "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/rdns" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"ip":"value","hostname":"value"}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/rdns", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "ip": "value",
    "hostname": "value"
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/rdns', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'ip' => 'value',
        'hostname' => 'value',
    ],
]);
Response
{
    "result": true
}
GET /datacenter/dedicated/{sid}/installation Installationsstatus abfragen Auth
URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/installation" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/installation", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/installation', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": {
        "ssh": {
            "root": {
                "password": "UOosKBueLhn8"
            },
            "user": {
                "username": "user",
                "password": "UOosKBueLhn8"
            }
        },
        "installation": true,
        "template": "Debian Jessie",
        "mac": ""
    }
}
POST /datacenter/dedicated/{sid}/terminate Server kündigen Auth

__WARNUNG! DER SERVER WIRD SOFORT GELÖSCHT UND DER ZUGANG WIDERRUFEN__

URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X POST "https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/terminate" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/terminate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->post('https://reseller.hosterapi.de/api/v1/datacenter/dedicated/{sid}/terminate', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}

Firewall

5 Endpoints
GET /datacenter/server/{sid}/firewall Get firewall status Auth

Returns the current firewall enabled state and all rules for the given server.

URL-Parameter
ParameterStatusBeschreibung
sid required int required The server SID.
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true,
    "enabled": true,
    "rules": [
        {
            "id": 1,
            "vm_id": 1,
            "direction": "inbound",
            "port": "80,443",
            "protocol": "tcp",
            "source": null,
            "destination": null,
            "action": "allow",
            "comment": "Allow HTTP\/HTTPS",
            "is_managed": false,
            "proxmox_pos": 0,
            "created_at": "2024-01-01T00:00:00.000000Z",
            "updated_at": "2024-01-01T00:00:00.000000Z"
        }
    ]
}
POST /datacenter/server/{sid}/firewall/toggle Toggle firewall on/off Auth

Enables or disables the firewall for the given server. On first enable, creates the managed outgoing-mail deny rule.

URL-Parameter
ParameterStatusBeschreibung
sid required int required The server SID.
Body-Parameter
ParameterTypStatusBeschreibung
enabled boolean required Whether to enable or disable the firewall.
Beispiel
curl -X POST "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/toggle" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"enabled":true}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/toggle", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "enabled": true
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->post('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/toggle', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'enabled' => true,
    ],
]);
Response
{
    "result": true
}
GET /datacenter/server/{sid}/firewall/rules Get firewall rules Auth

Returns all firewall rules for the given server, split by direction. Includes inbound, outbound, and managed (platform-created) rules.

URL-Parameter
ParameterStatusBeschreibung
sid required int required The server SID.
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/rules" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/rules", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/rules', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true,
    "inbound": [
        {
            "id": 1,
            "vm_id": 1,
            "direction": "inbound",
            "port": "80,443",
            "protocol": "tcp",
            "source": null,
            "destination": null,
            "action": "allow",
            "comment": "Allow HTTP\/HTTPS",
            "is_managed": false,
            "proxmox_pos": 0,
            "created_at": "2024-01-01T00:00:00.000000Z",
            "updated_at": "2024-01-01T00:00:00.000000Z"
        }
    ],
    "outbound": [],
    "managed": [
        {
            "id": 2,
            "vm_id": 1,
            "direction": "outbound",
            "port": "25,465,587",
            "protocol": "tcp",
            "source": null,
            "destination": null,
            "action": "deny",
            "comment": "Outgoing mail blocked by default",
            "is_managed": true,
            "proxmox_pos": 1,
            "created_at": "2024-01-01T00:00:00.000000Z",
            "updated_at": "2024-01-01T00:00:00.000000Z"
        }
    ]
}
POST /datacenter/server/{sid}/firewall/rules Add a firewall rule Auth

Creates a new firewall rule for the given server. Returns HTTP 201 on success. A port can only be set together with protocol tcp or udp.

URL-Parameter
ParameterStatusBeschreibung
sid required int required The server SID.
Body-Parameter
ParameterTypStatusBeschreibung
direction string required Rule direction. Allowed: inbound, outbound.
port string optional Port or port range (e.g. 80 or 80,443 or 8000-9000). Requires protocol tcp or udp.
protocol string optional Protocol. Allowed: tcp, udp, icmp.
source string optional Source CIDR (IPv4).
destination string optional Destination CIDR (IPv4).
action string required Rule action. Allowed: allow, deny.
comment string optional Human-readable label (max 255 chars).
Beispiel
curl -X POST "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/rules" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"direction":"value","port":"value","protocol":"value","source":"value","destination":"value","action":"value","comment":"value"}'
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/rules", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "direction": "value",
    "port": "value",
    "protocol": "value",
    "source": "value",
    "destination": "value",
    "action": "value",
    "comment": "value"
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->post('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/rules', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'direction' => 'value',
        'port' => 'value',
        'protocol' => 'value',
        'source' => 'value',
        'destination' => 'value',
        'action' => 'value',
        'comment' => 'value',
    ],
]);
Response
{
    "result": true,
    "rule": {
        "id": 3,
        "vm_id": 1,
        "direction": "inbound",
        "port": "8080",
        "protocol": "tcp",
        "source": null,
        "destination": null,
        "action": "allow",
        "comment": "Custom rule",
        "is_managed": false,
        "proxmox_pos": 2,
        "created_at": "2024-01-01T00:00:00.000000Z",
        "updated_at": "2024-01-01T00:00:00.000000Z"
    }
}
DELETE /datacenter/server/{sid}/firewall/rules/{ruleId} Delete a firewall rule Auth

Deletes a user-created firewall rule. Returns 204 No Content on success. Managed rules (is_managed=true) cannot be deleted and return 403.

URL-Parameter
ParameterStatusBeschreibung
sid required int required The server SID.
ruleId required int required The firewall rule ID.
Beispiel
curl -X DELETE "https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/rules/{ruleId}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/rules/{ruleId}", {
  method: "DELETE",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->delete('https://reseller.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/rules/{ruleId}', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);

Jobs

1 Endpoints
GET /job/{jobId} Job-Status abfragen Auth
URL-Parameter
ParameterStatusBeschreibung
jobId required Job ID
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/job/{jobId}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/job/{jobId}", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/job/{jobId}', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": {
        "status": "queued",
        "progress": 0,
        "output": null
    }
}

Software

3 Endpoints
GET /software/list Verfügbare Software auflisten Auth
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/software/list" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/software/list", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/software/list', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
POST /software/install Software installieren Auth
Body-Parameter
ParameterTypStatusBeschreibung
sid|ip string required Server ID or IP
package string required Package to install
password string required SSH root password for server
port int optional SSH port for server
Beispiel
curl -X POST "https://reseller.hosterapi.de/api/v1/software/install" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"sid|ip":"value","package":"value","password":"value","port":1}'
fetch("https://reseller.hosterapi.de/api/v1/software/install", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "sid|ip": "value",
    "package": "value",
    "password": "value",
    "port": 1
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->post('https://reseller.hosterapi.de/api/v1/software/install', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'sid|ip' => 'value',
        'package' => 'value',
        'password' => 'value',
        'port' => 1,
    ],
]);
Response
{
    "result": {
        "status": "queued",
        "jobId": 15,
        "progress": 0
    }
}
POST /software/uninstall Software deinstallieren Auth
Body-Parameter
ParameterTypStatusBeschreibung
sid|ip string required Server ID or IP
package string required Package to install
password string required SSH root password for server
port int optional SSH port for server
Beispiel
curl -X POST "https://reseller.hosterapi.de/api/v1/software/uninstall" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"sid|ip":"value","package":"value","password":"value","port":1}'
fetch("https://reseller.hosterapi.de/api/v1/software/uninstall", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "sid|ip": "value",
    "package": "value",
    "password": "value",
    "port": 1
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->post('https://reseller.hosterapi.de/api/v1/software/uninstall', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'sid|ip' => 'value',
        'package' => 'value',
        'password' => 'value',
        'port' => 1,
    ],
]);
Response
{
    "result": {
        "status": "queued",
        "jobId": 15,
        "progress": 0
    }
}

SSH-Keys

3 Endpoints
GET /ssh-keys List all SSH keys Auth

Returns all SSH keys for the authenticated user.

Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/ssh-keys" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/ssh-keys", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/ssh-keys', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": [
        {
            "id": 1,
            "name": "Production Server",
            "type": "ssh-ed25519",
            "fingerprint": "SHA256:abc123defgh456ijklmnopqrstuvwxyz0123456789A=",
            "created_at": "2024-01-01T00:00:00+00:00"
        }
    ]
}
POST /ssh-keys Add a new SSH key Auth

Adds a new SSH public key to the account. Returns HTTP 201 on success. Supported key types: ssh-rsa, ssh-ed25519, ecdsa. Maximum 10 keys per account.

Body-Parameter
ParameterTypStatusBeschreibung
name string required A name/label for the key.
public_key string required The SSH public key.
Beispiel
curl -X POST "https://reseller.hosterapi.de/api/v1/ssh-keys" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"name":"value","public_key":"value"}'
fetch("https://reseller.hosterapi.de/api/v1/ssh-keys", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "name": "value",
    "public_key": "value"
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->post('https://reseller.hosterapi.de/api/v1/ssh-keys', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'name' => 'value',
        'public_key' => 'value',
    ],
]);
Response
{
    "result": {
        "id": 2,
        "name": "Production Server",
        "type": "ssh-ed25519",
        "fingerprint": "SHA256:abc123defgh456ijklmnopqrstuvwxyz0123456789A=",
        "created_at": "2024-01-01T00:00:00+00:00"
    }
}
DELETE /ssh-keys/{id} Delete an SSH key Auth

Permanently deletes the specified SSH key.

URL-Parameter
ParameterStatusBeschreibung
id required int required The SSH key ID.
Beispiel
curl -X DELETE "https://reseller.hosterapi.de/api/v1/ssh-keys/{id}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/ssh-keys/{id}", {
  method: "DELETE",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->delete('https://reseller.hosterapi.de/api/v1/ssh-keys/{id}', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}

API-Token

3 Endpoints
GET /tokens List all tokens Auth

Returns a list of all API tokens for the authenticated user. Token values are masked (only prefix shown).

Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/tokens" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/tokens", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/tokens', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": [
        {
            "id": 1,
            "name": "Production Server",
            "token_prefix": "abcd1234...",
            "last_used_at": "2024-01-15T10:30:00+00:00",
            "expires_at": "2027-01-01T00:00:00+00:00",
            "is_expired": false,
            "created_at": "2024-01-01T00:00:00+00:00"
        }
    ]
}
POST /tokens Create a new token Auth

Creates a new API token. The plain token is only shown once in the response. Maximum 10 tokens per user.

Body-Parameter
ParameterTypStatusBeschreibung
name string required A label for the token.
expires_at string optional Expiry date (ISO 8601).
Beispiel
curl -X POST "https://reseller.hosterapi.de/api/v1/tokens" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{"name":"value","expires_at":"value"}'
fetch("https://reseller.hosterapi.de/api/v1/tokens", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  },
  body: JSON.stringify({
    "name": "value",
    "expires_at": "value"
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->post('https://reseller.hosterapi.de/api/v1/tokens', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
    'json' => [
        'name' => 'value',
        'expires_at' => 'value',
    ],
]);
Response
{
    "result": {
        "id": 2,
        "name": "Production Server",
        "token": "1|exampletoken_abcdefghijklmnopqrstuvwxyz",
        "expires_at": "2027-01-01T00:00:00+00:00",
        "created_at": "2024-01-01T00:00:00+00:00"
    }
}
DELETE /tokens/{id} Delete a token Auth

Permanently deletes the specified API token.

URL-Parameter
ParameterStatusBeschreibung
id required int required The token ID.
Beispiel
curl -X DELETE "https://reseller.hosterapi.de/api/v1/tokens/{id}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/tokens/{id}", {
  method: "DELETE",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->delete('https://reseller.hosterapi.de/api/v1/tokens/{id}', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": true
}

Sonstiges

1 Endpoints
GET /datacenter/location List all Locations Auth

Returns all available locations for a deployment

URL-Parameter
ParameterStatusBeschreibung
sid required Server ID
Beispiel
curl -X GET "https://reseller.hosterapi.de/api/v1/datacenter/location" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"
fetch("https://reseller.hosterapi.de/api/v1/datacenter/location", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}"
  }
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->get('https://reseller.hosterapi.de/api/v1/datacenter/location', [
    'headers' => [
        'Authorization' => 'Bearer {token}',
        'Accept' => 'application/json',
    ],
]);
Response
{
    "result": [
        {
            "id": 1,
            "name": "maincubes, Offenbach am Main",
            "country": "Deutschland",
            "iso": "DE",
            "note": "AMD Epyc 7402P, DDR4 ECC RAM, Samsung Datacenter Ceph Storage"
        }
    ]
}