API Reference
Complete REST API for Cloud Servers, Dedicated Servers and more. All endpoints at a glance — with examples in cURL, JavaScript and PHP.
Authentication
All requests require a Bearer Token in the Authorization header.
Format
Request body as JSON. Headers: Accept: application/json and Content-Type: application/json.
Responses
Success: {"result": ...}
Error: {"error": "..."}
Cloud Server
34 Endpoints(is running, cpu usage, mem, etc.)
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Example
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"
}
}
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Query Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
period |
string | optional | Period: day, week, month. Default: month |
Example
curl -X GET "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/traffic', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
(cpu usage, mem, etc.)
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Query Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
include |
string | optional | Optional. Pass `network` to include per-IP network parameters (gateway, netmask/prefix). |
Example
curl -X GET "https://reseller-sandbox.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-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 | Description |
|---|---|---|
sid |
required | Server ID |
Example
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": ""
}
]
}
Returns all network incidents for this VM (DDoS Attempts, Suspicious network activity, etc.)
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Example
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": "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
}
This function returns a url to a ready-to-embed novnc console. You can put this url in a iframe. **Warning:** This url must be accessed within **10 seconds** after sending a request. Otherwise the supplied VNC ticket will expire.
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Example
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:\/\/console.example.com\/novnc\/vnc.html?host=console.example.com&password=VNCTICKET-PLACEHOLDER&path=novnc%2Fproxy%2F1%2F100%2F%3Fport%3D5900%26vncticket%3DVNCTICKET-PLACEHOLDER"
}
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Query Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
async |
bool | optional | Pass async=1 to run deletion as background job and get a jobId back |
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
force |
bool | optional | Force delete vm, even if running |
Example
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,
],
]);
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
ip |
string | required | IP to set RDNS for (IPv4 only) |
hostname |
string | required | RDNS FQDN |
Example
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
}
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
name |
string | required | Friendly name for the VM (max 50 chars) |
Example
curl -X PUT "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/name', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
'json' => [
'name' => 'value',
],
]);
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Example
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/name" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/name', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
**Please note that downgrading IPs is not supported at this time. Attempts at this will be silently ignored**.
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
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 |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Example
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
}
**Please note that this command kill all running tasks and force reboot the VM**.
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Example
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 will be reinstalled matching the original config, including OS. Specify a template name to override automatic selection.
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
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) |
Example
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
}
}
New password will be automatically generated and returned on success. You may give a custom password using the "password" parameter
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
password |
string | optional | password, minimum 6 characters |
Example
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}"
}
}
This endpoint allows enabling or disabling the firewall rules for outgoing mails. Per default all servers are created with blocked ports for outgoing mails to prevent spam and abuse. You can enable or disable this rule using this endpoint if you are entitled to use this. If not you can contact out support to gain access to this endpoint.
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
deny |
boolean | required | Set to true to block outgoing mail ports, false to unblock them. |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Example
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',
],
]);
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
backup |
int | required | Backup to restore (unix timestamp) |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
backup |
int | required | Backup to delete (unix timestamp) |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
isoId |
string | required | ISO ID to insert |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
command |
required | optional | command to execute, available 'RESTART','BACKUP','SHUTDOWN','START' |
interval |
required | optional | interval, available 'DAILY','TWODAYS','THREEDAYS','WEEKLY','TWOWEEKS','MONTHLY','TWOMONTHS','THREEMONTHS' |
Example
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
}
Example
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 | Type | Status | Description |
|---|---|---|---|
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 |
Example
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
}
}
Pass `?include=name` to get SID + name objects instead of plain SIDs.
Query Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
include |
string | optional | Optional. Pass `name` to include VM names. |
Example
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/server?include=name" \
-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
]
}
Example
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
20 EndpointsExample
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"
}
}
}
]
}
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
id |
int | required | Server ID to order |
template |
string | required | Template to install |
hostname |
string | required | Server Hostname |
Example
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
}
This endpoint orders a custom server to be built and deplyoed. Response is a order number, which needs to be checked against the API in order to get the device ID on order completion. Note: orders can take **up to 48h** to complete!
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
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 |
Example
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 | Description |
|---|---|---|
id |
required | int Order number |
Example
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',
],
]);
Example
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"
]
}
If you expect to find a ID here but it's not present, most likely there was an issue completing the order. You'll have to account for this case yourself with some kind of order tracking.
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Example
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 | Type | Status | Description |
|---|---|---|---|
template |
string | required | Template to install |
Example
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"}'
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"
})
}).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',
],
]);
Response
{
"result": true
}
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Example
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"
}
Example
curl -X PUT "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/pdu/cycle', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
Example
curl -X PUT "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/pdu/on', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
Example
curl -X PUT "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/pdu/off', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
Example
curl -X GET "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/dedicated/{sid}/pdu/status', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": "powered"
}
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
ip |
string | required | IP to set RDNS for (IPv4 only) |
hostname |
string | required | RDNS FQDN |
Example
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 | Description |
|---|---|---|
sid |
required | Server ID |
Example
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": ""
}
}
__WARNING! THIS WILL IMMEDIATELY DELETE THE SERVER AND REVOKE ACCESS TO IT__
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Example
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
}
Firewall
5 EndpointsReturns the current firewall enabled state and all rules for the given server.
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | int required The server SID. |
Example
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/firewall" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.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"
}
]
}
Enables or disables the firewall for the given server. On first enable, creates the managed outgoing-mail deny rule.
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | int required The server SID. |
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
enabled |
boolean | required | Whether to enable or disable the firewall. |
Example
curl -X POST "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/toggle', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
'json' => [
'enabled' => true,
],
]);
Response
{
"result": true
}
Returns all firewall rules for the given server, split by direction. Includes inbound, outbound, and managed (platform-created) rules.
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | int required The server SID. |
Example
curl -X GET "https://reseller-sandbox.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-sandbox.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-sandbox.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"
}
]
}
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 Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | int required The server SID. |
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
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). |
Example
curl -X POST "https://reseller-sandbox.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-sandbox.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-sandbox.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"
}
}
Deletes a user-created firewall rule. Returns 204 No Content on success. Managed rules (is_managed=true) cannot be deleted and return 403.
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | int required The server SID. |
ruleId |
required | int required The firewall rule ID. |
Example
curl -X DELETE "https://reseller-sandbox.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-sandbox.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-sandbox.hosterapi.de/api/v1/datacenter/server/{sid}/firewall/rules/{ruleId}', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Jobs
1 EndpointsURL Parameters
| Parameter | Status | Description |
|---|---|---|
jobId |
required | Job ID |
Example
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 EndpointsExample
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 | Type | Status | Description |
|---|---|---|---|
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 |
Example
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 | Type | Status | Description |
|---|---|---|---|
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 |
Example
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
}
}
SSH-Keys
3 EndpointsReturns all SSH keys for the authenticated user.
Example
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/ssh-keys" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.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"
}
]
}
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 Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
name |
string | required | A name/label for the key. |
public_key |
string | required | The SSH public key. |
Example
curl -X POST "https://reseller-sandbox.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-sandbox.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-sandbox.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"
}
}
Permanently deletes the specified SSH key.
URL Parameters
| Parameter | Status | Description |
|---|---|---|
id |
required | int required The SSH key ID. |
Example
curl -X DELETE "https://reseller-sandbox.hosterapi.de/api/v1/ssh-keys/{id}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/ssh-keys/{id}', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
API-Token
3 EndpointsReturns a list of all API tokens for the authenticated user. Token values are masked (only prefix shown).
Example
curl -X GET "https://reseller-sandbox.hosterapi.de/api/v1/tokens" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.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"
}
]
}
Creates a new API token. The plain token is only shown once in the response. Maximum 10 tokens per user.
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
name |
string | required | A label for the token. |
expires_at |
string | optional | Expiry date (ISO 8601). |
Example
curl -X POST "https://reseller-sandbox.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-sandbox.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-sandbox.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"
}
}
Permanently deletes the specified API token.
URL Parameters
| Parameter | Status | Description |
|---|---|---|
id |
required | int required The token ID. |
Example
curl -X DELETE "https://reseller-sandbox.hosterapi.de/api/v1/tokens/{id}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
fetch("https://reseller-sandbox.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-sandbox.hosterapi.de/api/v1/tokens/{id}', [
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
],
]);
Response
{
"result": true
}
Sonstiges
1 EndpointsReturns all available locations for a deployment
URL Parameters
| Parameter | Status | Description |
|---|---|---|
sid |
required | Server ID |
Example
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"
}
]
}