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
Authentifizierung
Alle Requests benötigen einen Bearer Token im Authorization Header.
Format
Request Body als JSON. Headers: Accept: application/json und Content-Type: application/json.
Responses
Erfolg: {"result": ...}
Fehler: {"error": "..."}
Cloud Server
31 Endpoints(Laufstatus, CPU-Auslastung, RAM, etc.)
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/status" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.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"
}
}
(CPU-Auslastung, RAM, etc.)
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/config" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.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
}
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/software" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.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": ""
}
]
}
Gibt alle Netzwerk-Incidents dieser VM zurück (DDoS-Angriffe, verdächtige Netzwerkaktivität, etc.)
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/incidents" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.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": "10.50.23.5",
"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": "10.50.23.5",
"direction": 1,
"impact": 90107632,
"types": [
"NTP Amplification",
"DNS Amplification"
],
"ongoing": 0
}
],
"error": false
}
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 Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/console" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/console', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": "https:\/\/hosterapi.de\/novnc\/vnc.html?host=hosterapi.de&password=PVEVNC:604F72EF::e+9gopwLaB77MmLwK9eIUy50PhRjIEJd7ICVKwn3jd1NusqNeS2pIXOTDlCzIi+y6+Pxh\/fvSuCFh07dGVIMfm8a0fl\/ysS7zUmnZVlhVH4odguml\/0POryXQRhvsTWKC7hxeeOr3H1ljx8TIILpR5SXXdZy7Pa5Fo\/8asKuoLPXsGEAA7EcBwyscSGwN6hlHkBkNLKauDt49RyBhDi1Va\/ei7+NSpOaP0oT06B1ORmBMO5f+d0OxF0BI6jsqIBLMWwEL\/wUY+cx\/3KuM4i+UtT8eAhjQHhuIAhn7Q\/N+Mlj0LXXZCV7oBowY2zIBxG2y6Y1EG8Mdw16LEnGlAeHsg==&path=novnc%2Fproxy%2Fpve-dev%2F4007%2F%3Fport%3D5900%26vncticket%3DPVEVNC%253A604F72EF%253A%253Ae%252B9gopwLaB77MmLwK9eIUy50PhRjIEJd7ICVKwn3jd1NusqNeS2pIXOTDlCzIi%252By6%252BPxh%252FfvSuCFh07dGVIMfm8a0fl%252FysS7zUmnZVlhVH4odguml%252F0POryXQRhvsTWKC7hxeeOr3H1ljx8TIILpR5SXXdZy7Pa5Fo%252F8asKuoLPXsGEAA7EcBwyscSGwN6hlHkBkNLKauDt49RyBhDi1Va%252Fei7%252BNSpOaP0oT06B1ORmBMO5f%252Bd0OxF0BI6jsqIBLMWwEL%252FwUY%252Bcx%252F3KuM4i%252BUtT8eAhjQHhuIAhn7Q%252FN%252BMlj0LXXZCV7oBowY2zIBxG2y6Y1EG8Mdw16LEnGlAeHsg%253D%253D"
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Typ | Status | Beschreibung |
|---|---|---|---|
force |
bool | optional | Force delete vm, even if running |
Beispiel
curl -X POST "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/delete', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
'json' => [
'force' => true,
],
]);
Response
{
"result": true
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Typ | Status | Beschreibung |
|---|---|---|---|
ip |
string | required | IP to set RDNS for (IPv4 only) |
hostname |
string | required | RDNS FQDN |
Beispiel
curl -X POST "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/rdns', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
'json' => [
'ip' => 'value',
'hostname' => 'value',
],
]);
Response
{
"result": true
}
**Bitte beachte, dass ein IP-Downgrade derzeit nicht unterstützt wird. Versuche werden stillschweigend ignoriert**.
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Typ | Status | Beschreibung |
|---|---|---|---|
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-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/change', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
'json' => [
'cpuCores' => 1,
'mem' => 1,
'disk' => 'value',
'ipCount' => 1,
],
]);
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X PUT "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/start" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/start', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X PUT "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/shutdown" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/shutdown', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X PUT "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/stop" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/stop', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X PUT "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/reboot" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/reboot', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
**Achtung: Dieser Befehl beendet alle laufenden Aufgaben und erzwingt einen Neustart der VM**.
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X PUT "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/reset" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/reset', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X PUT "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/reboot/force', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
VM wird mit der ursprünglichen Konfiguration (inkl. OS) reinstalliert. Einen Template-Namen angeben, um die automatische Auswahl zu überschreiben.
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Typ | Status | Beschreibung |
|---|---|---|---|
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-sandbox.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-sandbox.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-sandbox.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
}
}
Ein neues Passwort wird automatisch generiert und bei Erfolg zurückgegeben. Mit dem Parameter "password" kann ein eigenes Passwort gesetzt werden
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Typ | Status | Beschreibung |
|---|---|---|---|
password |
string | optional | password, minimum 6 characters |
Beispiel
curl -X PUT "https://reseller-sandbox.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-sandbox.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-sandbox.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}"
}
}
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 Parameters
| Parameter | Typ | Status | Beschreibung |
|---|---|---|---|
deny |
boolean | required | Set to true to block outgoing mail ports, false to unblock them. |
Beispiel
curl -X POST "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/outgoing_mails', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
'json' => [
'deny' => true,
],
]);
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X GET "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/backups/list', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": [
1606685300,
1606585800,
1606575200
]
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X GET "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/backups/status', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": {
"status": "pending",
"progress": 0
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X PUT "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/backups/create', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Typ | Status | Beschreibung |
|---|---|---|---|
backup |
int | required | Backup to restore (unix timestamp) |
Beispiel
curl -X POST "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/backups/restore', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
'json' => [
'backup' => 1,
],
]);
Response
{
"result": "pending"
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Typ | Status | Beschreibung |
|---|---|---|---|
backup |
int | required | Backup to delete (unix timestamp) |
Beispiel
curl -X POST "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/backups/delete', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
'json' => [
'backup' => 1,
],
]);
Response
{
"result": true
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/iso" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.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"
}
]
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Typ | Status | Beschreibung |
|---|---|---|---|
isoId |
string | required | ISO ID to insert |
Beispiel
curl -X POST "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/iso', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
'json' => [
'isoId' => 'value',
],
]);
Response
{
"result": true,
"rebooted": true
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X DELETE "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/iso" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/iso', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/scheduled" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.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"
}
]
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Typ | Status | Beschreibung |
|---|---|---|---|
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-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/scheduled', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
'json' => [
'command' => 'value',
'interval' => 'value',
],
]);
Response
{
"result": true
}
Beispiel
curl -X DELETE "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/scheduled/{VMScheduledTask}', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
Body Parameters
| Parameter | Typ | Status | Beschreibung |
|---|---|---|---|
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-sandbox.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-sandbox.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-sandbox.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
}
}
Beispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/server" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": [
4001,
4002,
4003
]
}
Beispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/templates" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/templates', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": [
"Debian10.0"
]
}
Dedicated Server
17 EndpointsBeispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/dedicated/market" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.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"
}
}
}
]
}
Beispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/dedicated/market/parts" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.hosterapi.de/api/v1/datacenter/dedicated/market/parts", {
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-sandbox.hosterapi.de/api/v1/datacenter/dedicated/market/parts', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": {
"cpu": [
{
"id": 38,
"name": "Intel(R) Xeon(R) CPU E5-2650 v1",
"description": "8 Cores \/ 16 Threads @ 2.00GHz",
"count": 1,
"price": 0
},
{
"id": 42,
"name": "Intel(R) Xeon(R) CPU E5-2670 v1 @ 2.60GHz",
"description": null,
"count": 1,
"price": 0
},
{
"id": 49,
"name": "Intel(R) Xeon(R) CPU E5-2690 v2 @ 3.00GHz",
"description": null,
"count": 1,
"price": 0
},
{
"id": 54,
"name": "Intel(R) Xeon(R) CPU E5-2609 v1 @ 2.40GHz",
"description": null,
"count": 1,
"price": 0
},
{
"id": 56,
"name": "Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz",
"description": null,
"count": 1,
"price": 0
},
{
"id": 58,
"name": "Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz",
"description": null,
"count": 1,
"price": 0
}
],
"ram": [
{
"id": 29,
"name": "16 GB DDR3 ECC",
"description": null,
"count": 10,
"price": 5
}
],
"hdd": [
{
"id": 27,
"name": "Seagate BarraCuda 2 TB HDD",
"description": null,
"count": 0,
"price": 0
}
],
"ssd": [
{
"id": 33,
"name": "Crucial BX500 240GB",
"description": null,
"count": 1,
"price": 0
},
{
"id": 35,
"name": "SanDisk SSD PLU 120GB",
"description": null,
"count": 1,
"price": 0
},
{
"id": 41,
"name": "SanDisk SSD PLU 240GB",
"description": null,
"count": 1,
"price": 0
}
]
}
}
Body Parameters
| Parameter | Typ | Status | Beschreibung |
|---|---|---|---|
id |
int | required | Server ID to order |
template |
string | required | Template to install |
hostname |
string | required | Server Hostname |
Beispiel
curl -X POST "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/dedicated/order', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
'json' => [
'id' => 1,
'template' => 'value',
'hostname' => 'value',
],
]);
Response
{
"result": true
}
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 Parameters
| Parameter | Typ | Status | Beschreibung |
|---|---|---|---|
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-sandbox.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-sandbox.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-sandbox.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
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
id |
required | int Order number |
Beispiel
curl -X GET "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/dedicated/order/byod/status/{id}', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Beispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/dedicated/templates" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.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"
]
}
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-sandbox.hosterapi.de/api/v1/datacenter/dedicated" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/dedicated', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": [
{
"id": 9,
"orderComplete": false
}
]
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X PUT "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/start" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/start', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X PUT "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/shutdown" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/shutdown', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X PUT "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/reboot" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/reboot', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
Body Parameters
| Parameter | Typ | Status | Beschreibung |
|---|---|---|---|
template |
string | required | Template to install |
hostname |
string | optional | Server Hostname |
Beispiel
curl -X PUT "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/reinstall" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"template":"value","hostname":"value"}'
fetch("https://reseller-sandbox.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",
"hostname": "value"
})
}).then(r => r.json()).then(console.log);
$client = new \GuzzleHttp\Client();
$response = $client->put('https://reseller-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/reinstall', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
'json' => [
'template' => 'value',
'hostname' => 'value',
],
]);
Response
{
"result": true
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/console" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/console', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": "https:\/\/example.com\/novnc\/vnc.html"
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/status" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.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"
}
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/config" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.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"
}
}
}
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Typ | Status | Beschreibung |
|---|---|---|---|
ip |
string | required | IP to set RDNS for (IPv4 only) |
hostname |
string | required | RDNS FQDN |
Beispiel
curl -X PUT "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/rdns', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
'json' => [
'ip' => 'value',
'hostname' => 'value',
],
]);
Response
{
"result": true
}
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/installation" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.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": ""
}
}
__WARNUNG! DER SERVER WIRD SOFORT GELÖSCHT UND DER ZUGANG WIDERRUFEN__
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X POST "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/terminate" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/terminate', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
Jobs
1 EndpointsURL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
jobId |
required | Job ID |
Beispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/job/{jobId}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/job/{jobId}', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": {
"status": "queued",
"progress": 0,
"output": null
}
}
Software
3 EndpointsBeispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/software/list" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/software/list', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Body Parameters
| Parameter | Typ | Status | Beschreibung |
|---|---|---|---|
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-sandbox.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-sandbox.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-sandbox.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
}
}
Body Parameters
| Parameter | Typ | Status | Beschreibung |
|---|---|---|---|
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-sandbox.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-sandbox.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-sandbox.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
}
}
Sonstiges
1 EndpointsReturns all available locations for a deployment
URL Parameters
| Parameter | Status | Beschreibung |
|---|---|---|
sid |
required | Server ID |
Beispiel
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/location" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.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"
}
]
}