Introduction
The dashserv API operates over HTTPS and returns JSON. The API is using HTTP status codes and a body parameter to identify request success.
Authentication
To use the API, you first need to create an API token. Go to your API token management, and create an API token. To authenticate against our API you need to pass the token in the authorization using Bearer auth.
Now you're ready to make your first request against the API. To get a list of all your dedicated servers, just copy and paste the curl request on the right side in your CLI or use it with other coding languages.
curl 'https://api.dashserv.io/v1/product/dedicated-server' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": [] }
Modularity
Because our API is modular, there are endpoints that are available for all products and return the same url and response schema for each product. Here are some of them:
Endpoint |
---|
GET https://api.dashserv.io/v1/product/{product} |
GET https://api.dashserv.io/v1/product/{product}/{productUuid} |
GET https://api.dashserv.io/v1/product/{product}/{productUuid}/status |
POST https://api.dashserv.io/v1/product/{product}/{productUuid}/actions/{action} |
How to use / order workflow
To order a new product, you may request the current product information, availability, pricing and configuration options from the get product endpoint. See the example in our PHP SDK on github.
Using the needed configuration options together with location and period parameters (which are always required) you can place an order for that product. If successful, this will return the uuid of the placed order.
With that uuid, you can check the status of the order to see if the product is deployed. The deployment will take place in the background using our asynchronous queue infrastructure as soon as the order is placed.
Once the order status is fulfilled and installed the ordered product will be listed in the "get all" endpoint of the respective product. All other available product-specific endpoint will be available using the product uuid.
Products are automatically locked / deleted once the product is not renewed. For resellers, the product will run for infinite time until the product gets terminated with our API.
Errors
If an error occurs, the success
parameter changes to false and data
will contain
the error message. Below are some general error messages, there may be other declared in the specific
documentation of the call.
General error codes
msg | Description |
---|---|
resource_not_found | The requested resource was not found |
ratelimit_exceeded | Your are sending too many requests. |
empty_field:x | Parameter is missing |
forbidden | Given token has insufficient permission (read/write) |
HTTP Error codes
Code | Description |
---|---|
200 | Function successfully executed |
404 | Invalid API route |
403 | Invalid or missing API authentication |
405 | Invalid HTTP method. Check that the method (POST|GET|DELETE|PUT) matches what the documentation indicates |
412 | Request failed. Check the response body for a more detailed description |
422 | Empty or invalid parameter |
500 | Internal server error. Try again at a later time or report to our customer service |
503 | Rate limit hit. Try your request again later |
{ "success": false, "data": "ressource_not_found" }
Order
Get product pricing / options
Returns information and the interactive configuration form for the given product. You may render the options
in data->options in your configuration form for the user. You must pass every option with the respective
value to the place order endpoint.
In data->pricing->periods
you can find all the available periods for the product. A period
contains the length, locked length and other meta information.
See an
example in
our PHP SDK on github how to use this endpoint.
Try e.g. vserver
, vserver:configure
, dedicated-server:EHe92D
HTTP Request
GET https://api.dashserv.io/v1/manage/product/{product}
Parameter
Parameter | Type | Description |
---|---|---|
product | enum (required) | name of the product, example: vserver|dedicated-server:{uuid}|webhosting |
curl 'https://api.dashserv.io/v1/manage/product/dedicated-server:h5HGC' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": { "uuid": "JIzW1", "name": "dedicated-server:h5HGC", "type": "options", "available": true, "display": { "name": "Dedizierter Server - Intel Xeon E3-1270v2 - 32 GB RAM - 2x 250 GB DC SSD", "icon": "/assets/img/products/dedicated-server.png", "description": "Viel Power für wenig Geld! Ganz ohne nervige Nachbarn und perfekt für jedes kleinere Projekt.", "content": "" }, "setupTime": 0, "locations": [ { "uuid": "kc7aV", "display": { "name": "Skylink, Eygelshoven", "country": "Niederlande", "advantages": [] }, "country": "NL", "location": { "latitude": 50.1223792, "longitude": 8.7425231 }, "priceMultiplier": 1 } ], "options": { "cpu": { "changeable": false, "visible": false, "type": "select", "cost": 0, "setup": 0, "options": [ { "display": "Intel Xeon E3-1270v2", "cost": 0, "setup": 0 } ], "icon": "fa-microchip" }, "ram": { "changeable": false, "type": "select", "cost": 0, "setup": 0, "options": [ { "display": "32 GB DDR3 RAM", "cost": 0, "setup": 0 } ], "icon": "fa-memory" }, "disk": { "changeable": false, "type": "select", "cost": 0, "setup": 0, "options": [ { "display": "2x 250 GB DC SSD", "cost": 0, "setup": 0 } ], "icon": "fa-hdd" }, "traffic": { "changeable": false, "type": "select", "cost": 0, "setup": 0, "options": [ { "display": "5 TB Highspeed Traffic", "cost": 0, "setup": 0 } ], "icon": "fa-network-wired" }, "bandwidth": { "changeable": false, "type": "number", "cost": 0, "setup": 0, "suffix": "x 1 Gbit/s", "options": { "min": 2, "max": 2, "costEach": 0, "setupEach": 0, "step": 1 }, "icon": "fa-plug" }, "os": { "changeable": false, "type": "select", "cost": 0, "setup": 0, "options": [ { "display": "Installierbar via IPMI", "cost": 0, "setup": 0 } ], "icon": "fa-compact-disc" } }, "children": null, "pricing": { "percentage": 1, "periods": [ { "uuid": "Oha73a", "displayName": "1 Monat", "periodLength": 2592000, "lockedLength": 604800, "totalPercentage": 1, "priceMultiplier": 1, "renewNotifications": [ 604800, 259200, 86400 ] }, { "uuid": "Oj3aJNa", "displayName": "2 Monate", "periodLength": 5184000, "lockedLength": 604800, "totalPercentage": 1, "priceMultiplier": 2, "renewNotifications": [ 1209600, 604800, 259200, 86400 ] }, { "uuid": "7JHa3t", "displayName": "3 Monate", "periodLength": 7776000, "lockedLength": 604800, "totalPercentage": 1, "priceMultiplier": 3, "renewNotifications": [ 2419200, 604800, 259200, 86400 ] } ], "defaultPeriod": "Oha73a" } } }
Place order
Places an order and returns the order uuid. You must pass every option, the location and seleted period to
this endpoint. You may also request an calculation of the selected order with the "calculate" parameter. If
so, you can use data->positions to display directly to your user in the checkout. You will be billed
data->price->brut
depending on the selected period.
Info: Resellers with hourly billing will be billed data->price->brut / 720
per hour the service
is active.
If placed successfully, the endpoint will return an orderid.
HTTP Request
POST https://api.dashserv.io/v1/manage/product/{product}
Parameter
Parameter | Type | Description |
---|---|---|
product | enum (required) | Enum values: vserver|dedicated-server:{uuid}|webhosting |
data | array (required) | values for the options, location and period |
curl -X POST -F 'data[os]=0' -F 'calculate=true' -F 'data[cpu]=0' -F 'data[ram]=0' -F 'data[traffic]=0' -F 'data[bandwidth]=2' \
-F 'data[disk]=0' -F 'data[location]=kc7aV' -F 'data[interval]=Oha73a' 'https://api.dashserv.io/v1/manage/product/dedicated-server:h5HGC' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "B86uM" }
{ "success": true, "data": { "positions": [ { "name": "basePrice", "type": null, "value": "", "setup": { "net": 0, "tax": 0, "brut": 0 }, "costs": { "net": 28.917, "tax": 6.783, "brut": 35.7 }, "children": [] }, { "name": "cpu", "type": "select", "value": "Intel Xeon E3-1270v2", "setup": { "net": 0, "tax": 0, "brut": 0 }, "costs": { "net": 0, "tax": 0, "brut": 0 }, "children": [] }, { "name": "ram", "type": "select", "value": "32 GB DDR3 RAM", "setup": { "net": 0, "tax": 0, "brut": 0 }, "costs": { "net": 0, "tax": 0, "brut": 0 }, "children": [] }, { "name": "disk", "type": "select", "value": "2x 250 GB DC SSD", "setup": { "net": 0, "tax": 0, "brut": 0 }, "costs": { "net": 0, "tax": 0, "brut": 0 }, "children": [] }, { "name": "traffic", "type": "select", "value": "5 TB Highspeed Traffic", "setup": { "net": 0, "tax": 0, "brut": 0 }, "costs": { "net": 0, "tax": 0, "brut": 0 }, "children": [] }, { "name": "bandwidth", "type": "number", "value": "2x 1 Gbit/s", "setup": { "net": 0, "tax": 0, "brut": 0 }, "costs": { "net": 0, "tax": 0, "brut": 0 }, "children": [] }, { "name": "os", "type": "select", "value": "Installierbar via IPMI", "setup": { "net": 0, "tax": 0, "brut": 0 }, "costs": { "net": 0, "tax": 0, "brut": 0 }, "children": [] }, { "name": "location", "type": null, "value": "Skylink, Eygelshoven", "setup": { "net": 0, "tax": 0, "brut": 0 }, "costs": { "net": 0, "tax": 0, "brut": 0 }, "children": [] } ], "price": { "net": 28.917, "tax": 6.783, "brut": 35.7 }, "realPrice": { "net": 28.917, "tax": 6.783, "brut": 35.7 }, "setup": { "net": 0, "tax": 0, "brut": 0 }, "realSetup": { "net": 0, "tax": 0, "brut": 0 }, "todayPrice": { "net": 28.917, "tax": 6.783, "brut": 35.7 }, "coupon": null, "period": null } }
{ "success": false, "data": { "field": "bandwidth", "value": "0", "msg": "number_out_of_range" } }
Check order
Checks the deployment of an order. You may use data->status
to check if the order is fulfilled.
Possible status: okay, installing, error, cancelled, wait_for_host. If the status is error, data->statusData
may be a string with debug information why the order is failed. Please contact us if so.
Once the status is okay
, you can save the data->productuuid
and use it to make
specific requests to the ordered product.
HTTP Request
GET https://api.dashserv.io/v1/manage/order/{uuid}
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | uuid of the order |
curl 'https://api.dashserv.io/v1/manage/order/B86uM' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": { "uuid": "B86uM", "product": { "uuid": "JIzW1", "name": "dedicated-server:h5HGC", "type": "options", "available": true, "display": { "name": "Dedizierter Server - Intel Xeon E3-1270v2 - 32 GB RAM - 2x 250 GB DC SSD", "icon": "/assets/img/products/dedicated-server.png", "description": "Viel Power für wenig Geld! Ganz ohne nervige Nachbarn und perfekt für jedes kleinere Projekt.", "content": "" }, "setupTime": 0, "locations": [ { "uuid": "kc7aV", "display": { "name": "Skylink, Eygelshoven", "country": "Niederlande", "advantages": [] }, "country": "NL", "location": { "latitude": 50.1223792, "longitude": 8.7425231 }, "priceMultiplier": 1 } ], "options": { "cpu": { "changeable": false, "visible": false, "type": "select", "cost": 0, "setup": 0, "options": [ { "display": "Intel Xeon E3-1270v2", "cost": 0, "setup": 0 } ], "icon": "fa-microchip" }, "ram": { "changeable": false, "type": "select", "cost": 0, "setup": 0, "options": [ { "display": "32 GB DDR3 RAM", "cost": 0, "setup": 0 } ], "icon": "fa-memory" }, "disk": { "changeable": false, "type": "select", "cost": 0, "setup": 0, "options": [ { "display": "2x 250 GB DC SSD", "cost": 0, "setup": 0 } ], "icon": "fa-hdd" }, "traffic": { "changeable": false, "type": "select", "cost": 0, "setup": 0, "options": [ { "display": "5 TB Highspeed Traffic", "cost": 0, "setup": 0 } ], "icon": "fa-network-wired" }, "bandwidth": { "changeable": false, "type": "number", "cost": 0, "setup": 0, "suffix": "x 1 Gbit/s", "options": { "min": 2, "max": 2, "costEach": 0, "setupEach": 0, "step": 1 }, "icon": "fa-plug" }, "os": { "changeable": false, "type": "select", "cost": 0, "setup": 0, "options": [ { "display": "Installierbar via IPMI", "cost": 0, "setup": 0 } ], "icon": "fa-compact-disc" } }, "children": null, "pricing": { "percentage": 1, "periods": [ { "uuid": "Oha73a", "displayName": "1 Monat", "periodLength": 2592000, "lockedLength": 604800, "totalPercentage": 1, "priceMultiplier": 1, "renewNotifications": [ 604800, 259200, 86400 ] }, { "uuid": "Oj3aJNa", "displayName": "2 Monate", "periodLength": 5184000, "lockedLength": 604800, "totalPercentage": 1, "priceMultiplier": 2, "renewNotifications": [ 1209600, 604800, 259200, 86400 ] }, { "uuid": "7JHa3t", "displayName": "3 Monate", "periodLength": 7776000, "lockedLength": 604800, "totalPercentage": 1, "priceMultiplier": 3, "renewNotifications": [ 2419200, 604800, 259200, 86400 ] } ], "defaultPeriod": "Oha73a" } }, "productuuid": "o3qzt", "unix": { "created": 1640353858, "ready": null }, "status": "installing", "statusData": null, "productData": { "os": "0", "cpu": "0", "ram": "0", "traffic": "0", "bandwidth": "2", "disk": "0", "location": "kc7aV", "interval": "Oha73a" } } }
Terminate product
Info: this endpoint is only available for reseller accounts and will be forbidden for normal customers.
Terminates (deletes) the given product immediately and stops the hourly billing.
HTTP Request
DELETE https://api.dashserv.io/v1/product/{product}/{productUuid}
Parameter
Parameter | Type | Description |
---|---|---|
product | string (required) | technical name of the product |
productUuid | string (required) | uuid of the product |
curl -X DELETE 'https://api.dashserv.io/v1/product/vserver/lLPgX' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "product_terminate_success" }
Dedicated server
Get all
Lists all dedicated servers in your account
HTTP Request
GET https://api.dashserv.io/v1/product/dedicated-server
curl 'https://api.dashserv.io/v1/product/dedicated-server' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": [ { "uuid": "o3qzt", "customer": 14810, "payment": { "uuid": "byNYX", "state": "waiting", "type": "hourly", "price": 35.7, "customer": 14810, "period": null, "product": { "name": "dedicated-server:h5HGC", "uuid": "o3qzt", "realName": null }, "data": null, "deletion": null, "autoRenew": false, "coupon": null, "unix": 1640353858, "transaction": { "last": null, "next": null }, "hourly": { "uuid": "D5WQH", "billed": false, "price": { "hourly": 0.04958, "monthly": 35.7, "hours": 1, "current": 0.04958 }, "payment": { "month": "12-2021", "start": 1640353858, "end": null }, "product": { "name": "dedicated-server:h5HGC", "uuid": "o3qzt" } } }, "status": "okay", "name": "kd14810", "unix": 1640356007, "device": { "uuid": "sMe9PE", "status": "ready", "unix": 1610700818, "model": { "uuid": "h5HGC", "allowPreorder": false, "stock": 0, "product": "dedicated-server:h5HGC", "visible": "0", "string": "Intel Xeon E3-1270v2 - 32 GB RAM - 2x 250 GB DC SSD", "cpu": { "amount": 1, "model": "Intel(R) Xeon(R) CPU E3-1270v2 @ 3.50GHz", "name": "Intel Xeon E3-1270v2", "cores": 4, "threads": 8, "frequency": { "base": 3.5, "turbo": 3.9 } }, "ram": { "amount": 32, "sticks": 8, "max": 4, "model": "Samsung M391B1G73QH0-YK0 @ 1600 MHz", "type": "DDR3" }, "disks": { "all": [ { "name": "250 GB DC SSD", "type": "SSD", "capacity": "250" }, { "name": "250 GB DC SSD", "type": "SSD", "capacity": "250" } ], "string": "2x 250 GB DC SSD", "maxCapacity": 2 }, "network": { "bandwith": { "amount": 2, "quantity": 1000 } }, "price": { "monthly": 42, "setup": 0 } }, "location": { "uuid": "kc7aV", "display": { "name": "Skylink, Eygelshoven", "country": "Niederlande", "advantages": [] }, "country": "NL", "location": { "latitude": 50.1223792, "longitude": 8.7425231 }, "priceMultiplier": 1 }, "visible": true, "network": { "billId": null } } } ] }
Get single server
Lists a the single dedicated server
HTTP Request
GET https://api.dashserv.io/v1/product/dedicated-server/{uuid}
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl 'https://api.dashserv.io/v1/product/dedicated-server/o3qzt' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": { "uuid": "o3qzt", "customer": 14810, "payment": { "uuid": "byNYX", "state": "waiting", "type": "hourly", "price": 35.7, "customer": 14810, "period": null, "product": { "name": "dedicated-server:h5HGC", "uuid": "o3qzt", "realName": null }, "data": null, "deletion": null, "autoRenew": false, "coupon": null, "unix": 1640353858, "transaction": { "last": null, "next": null }, "hourly": { "uuid": "D5WQH", "billed": false, "price": { "hourly": 0.04958, "monthly": 35.7, "hours": 1, "current": 0.04958 }, "payment": { "month": "12-2021", "start": 1640353858, "end": null }, "product": { "name": "dedicated-server:h5HGC", "uuid": "o3qzt" } } }, "status": "okay", "name": "kd14810", "unix": 1640356007, "device": { "uuid": "sMe9PE", "status": "ready", "unix": 1610700818, "model": { "uuid": "h5HGC", "allowPreorder": false, "stock": 0, "product": "dedicated-server:h5HGC", "visible": "0", "string": "Intel Xeon E3-1270v2 - 32 GB RAM - 2x 250 GB DC SSD", "cpu": { "amount": 1, "model": "Intel(R) Xeon(R) CPU E3-1270v2 @ 3.50GHz", "name": "Intel Xeon E3-1270v2", "cores": 4, "threads": 8, "frequency": { "base": 3.5, "turbo": 3.9 } }, "ram": { "amount": 32, "sticks": 8, "max": 4, "model": "Samsung M391B1G73QH0-YK0 @ 1600 MHz", "type": "DDR3" }, "disks": { "all": [ { "name": "250 GB DC SSD", "type": "SSD", "capacity": "250" }, { "name": "250 GB DC SSD", "type": "SSD", "capacity": "250" } ], "string": "2x 250 GB DC SSD", "maxCapacity": 2 }, "network": { "bandwith": { "amount": 2, "quantity": 1000 } }, "price": { "monthly": 42, "setup": 0 } }, "location": { "uuid": "kc7aV", "display": { "name": "Skylink, Eygelshoven", "country": "Niederlande", "advantages": [] }, "country": "NL", "location": { "latitude": 50.1223792, "longitude": 8.7425231 }, "priceMultiplier": 1 }, "visible": true, "network": { "billId": null } } } }
Get marketplace
Returns all available models with the stock quantity. If the stock is above zero, you can order the model
and it will be deployed instantly. Please use data->product
to place the
order
HTTP Request
GET https://api.dashserv.io/v1/product/dedicated-server/models
curl 'https://api.dashserv.io/v1/product/dedicated-server/models' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": [ { "uuid": "Fzasc", "allowPreorder": false, "stock": 2, "product": "dedicated-server:Fzasc", "visible": "0", "string": "Intel Xeon E3-1230v2 - 32 GB RAM - 1x 250 GB SSD", "cpu": { "amount": 1, "model": "Intel(R) Xeon(R) CPU E3-1230v2 @ 3.30GHz", "name": "Intel Xeon E3-1230v2", "cores": 4, "threads": 8, "frequency": { "base": 3.3, "turbo": 3.7 } }, "ram": { "amount": 32, "sticks": 8, "max": 4, "model": "Samsung M391B1G73QH0-YK0 @ 1600 MHz", "type": "DDR3" }, "disks": { "all": [ { "name": "250 GB SSD", "type": "SSD", "capacity": "250" } ], "string": "1x 250 GB SSD", "maxCapacity": 2 }, "network": { "bandwith": { "amount": 2, "quantity": 1000 } }, "price": { "monthly": 35, "setup": 0 } }, { "uuid": "BSDcu", "allowPreorder": true, "stock": 1, "product": "dedicated-server:BSDcu", "visible": "0", "string": "Intel Xeon E3-1231v3 - 32 GB RAM - 1x 250 GB SSD", "cpu": { "amount": 1, "model": "Intel(R) Xeon(R) CPU E3-1231v3 @ 3.50GHz", "name": "Intel Xeon E3-1231v3", "cores": 4, "threads": 8, "frequency": { "base": 3.4, "turbo": 3.8 } }, "ram": { "amount": 32, "sticks": 8, "max": 4, "model": "Samsung M391B1G73QH0-YK0 @ 1600 MHz", "type": "DDR3" }, "disks": { "all": [ { "name": "250 GB SSD", "type": "SSD", "capacity": "250" } ], "string": "1x 250 GB SSD", "maxCapacity": 2 }, "network": { "bandwith": { "amount": 2, "quantity": 1000 } }, "price": { "monthly": 39, "setup": 0 } } ] }
Get templates
Returns all available templates you can use for reinstallation or order of an dedicated server. The templates are grouped per distribution.
HTTP Request
GET https://api.dashserv.io/v1/product/dedicated-server/templates
curl 'https://api.dashserv.io/v1/product/dedicated-server/templates' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": { "centos": [ { "id": 260, "name": "CentOS 6" }, { "id": 261, "name": "CentOS 7" }, { "id": 280, "name": "CentOS 8" } ], "debian": [ { "id": 262, "name": "Debian 8 (Jessie)" }, { "id": 263, "name": "Debian 9 (Stretch)" }, { "id": 278, "name": "Debian 10 (Buster)" }, { "id": 295, "name": "Debian 11 (Bullseye)" } ] }
Get status
Returns the current power state of the device
HTTP Request
GET https://api.dashserv.io/v1/product/dedicated-server/{uuid}/status
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl 'https://api.dashserv.io/v1/product/dedicated-server/o3qzt/status' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": { "status": "online" } }
Start server
Sends a power on signal to the server using IPMI network API.
HTTP Request
POST https://api.dashserv.io/v1/product/dedicated-server/{uuid}/actions/start
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl -X POST 'https://api.dashserv.io/v1/product/dedicated-server/o3qzt/actions/start' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "action_executed_successfully" }
Shutdown server
Sends a ACPI shutdown signal to the server using IPMI network API.
HTTP Request
POST https://api.dashserv.io/v1/product/dedicated-server/{uuid}/actions/shutdown
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl -X POST 'https://api.dashserv.io/v1/product/dedicated-server/o3qzt/actions/shutdown' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "action_executed_successfully" }
Reset server
Sends a power-reset signal to the server using IPMI network API. This is equivalent of pulling the power cord and plugging it in again!
HTTP Request
POST https://api.dashserv.io/v1/product/dedicated-server/{uuid}/actions/reset
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl -X POST 'https://api.dashserv.io/v1/product/dedicated-server/o3qzt/actions/reset' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "action_executed_successfully" }
Get network information
Gets the network configuration of the configured ip adresses and subnets
HTTP Request
GET https://api.dashserv.io/v1/product/dedicated-server/{uuid}/network
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl 'https://api.dashserv.io/v1/product/dedicated-server/o3qzt/network' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": [ { "uuid": "jcGvE", "ip": "185.117.1.72", "userid": 14810, "status": "GIVEN", "subnet": { "uuid": "uJf4L", "status": "AVAILABLE", "netaddress": "123.456.7.89", "prefix": 27, "netmask": "255.255.255.224", "gateway": "123.456.7.89" }, "type": "IPv4", "product": { "name": "dedicated-server:h5HGC", "uuid": "o3qzt" }, "unix": { "created": "1624144752", "userchange": "1640353858" }, "settings": { "layer7": "only_on", "layer4": "dynamic", "rdns": null, "alert": true }, "customName": null }, { "uuid": "p7StX", "ip": "185.117.1.71", "userid": 14810, "status": "AVAILABLE", "subnet": { "uuid": "uJf4L", "status": "AVAILABLE", "netaddress": "123.456.7.89", "prefix": 27, "netmask": "255.255.255.224", "gateway": "123.456.7.89" }, "type": "IPv4", "product": { "name": "dedicated-server:h5HGC", "uuid": "o3qzt" }, "unix": { "created": "1624144752", "userchange": "1640356007" }, "settings": { "layer7": null, "layer4": null, "rdns": null, "alert": true }, "customName": null } ] }
Get installation status
This returns the current status if an installation is running. This endpoint also return the username and
password for ssh authentication after the installation is ready. If an installation is running, you can get
the installation log from the log
parameter.
HTTP Request
GET https://api.dashserv.io/v1/product/dedicated-server/{uuid}/installation/status
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl 'https://api.dashserv.io/v1/product/dedicated-server/o3qzt/installation/status' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": { "installation": false, "log": null, "os": "Proxmox VE 6", "mac": "1E:59:E5:28:25:19", "ssh": { "root": "pVwkVa2G", "user": "Lo9ZLf8U" } } }
Create installation
Starts an installation of the server. The server will immediately reboot and start in the installer using PXE. You can monitor the installation status using this endpoint
HTTP Request
POST https://api.dashserv.io/v1/product/dedicated-server/{uuid}/installation/create
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
template | string (required) | id of the new template |
hostname | string (required) | new hostname |
curl -X POST -F 'template=123' -F 'hostname=test.de' 'https://api.dashserv.io/v1/product/dedicated-server/o3qzt/installation/create' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "dedicated_server_installation_create_success" }
vServer
Get all
Lists all vservers in your account
HTTP Request
GET https://api.dashserv.io/v1/product/vservers
curl 'https://api.dashserv.io/v1/product/vserver' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": [ { "uuid": "lLPgX", "userid": 14810, "name": "test", "options": { "ram": 2, "cores": 1, "disk": 40, "image": { "name": "debian10", "group": "debian", "displayName": "Debian 10", "version": "10", "type": "QEMU", "visible": true } }, "payment": { "uuid": "wKg2d", "state": "waiting", "type": "hourly", "price": 2.17, "customer": 14810, "period": null, "product": { "name": "vserver", "uuid": "lLPgX", "realName": null }, "data": null, "deletion": null, "autoRenew": false, "coupon": null, "unix": 1640311910, "transaction": { "last": null, "next": null }, "hourly": { "uuid": "YquJ7", "billed": false, "price": { "hourly": 0.00301, "monthly": 2.17, "hours": 22, "current": 0.06622 }, "payment": { "month": "12-2021", "start": 1640311910, "end": null }, "product": { "name": "vserver", "uuid": "lLPgX" } } }, "status": "OKAY", "image": { "name": "debian10", "group": "debian", "displayName": "Debian 10", "version": "10", "type": "QEMU", "visible": true }, "unix": 1640311942, "location": { "uuid": "kc7aV", "display": { "name": "Skylink, Eygelshoven", "country": "Niederlande", "advantages": [] }, "country": "NL", "location": { "latitude": 50.1223792, "longitude": 8.7425231 }, "priceMultiplier": 1 }, "limits": { "backups": 1, "snapshot": 5 }, "network": { "public": { "ipv4": { "uuid": "qGzRr", "ip": "123.456.7.89", "userid": 14810, "status": "GIVEN", "subnet": { "uuid": "vwf2WN", "status": "AVAILABLE", "netaddress": "123.456.7.0", "prefix": 24, "netmask": "255.255.255.0", "gateway": "123.456.7.89" }, "type": "IPv4", "product": { "name": "vserver", "uuid": "lLPgX" }, "unix": { "created": "1607936226", "userchange": "1640311932" }, "settings": { "layer7": "only_off", "layer4": "dynamic", "rdns": null, "alert": true }, "customName": null }, "ipv6": { "uuid": "llw70", "ip": "2b1e:4201:a120:10a::135", "userid": 14810, "status": "GIVEN", "subnet": { "uuid": "B4W2uh", "status": "AVAILABLE", "netaddress": "2b1e:4201:a120:10a::", "prefix": 64, "netmask": "2b1e:4201:a120:10a::", "gateway": "2b1e:4201:a120:10a::1" }, "type": "IPv6", "product": { "name": "vserver", "uuid": "lLPgX" }, "unix": { "created": "1607936228", "userchange": "1640311932" }, "settings": { "layer7": "only_off", "layer4": "dynamic", "rdns": null, "alert": true }, "customName": null }, "interfaces": { "net0": { "uuid": "uFSVB", "status": "ACTIVE", "name": "net0", "ipv4": { "uuid": "qGzRr", "ip": "123.456.7.89", "userid": 14810, "status": "GIVEN", "subnet": { "uuid": "vwf2WN", "status": "AVAILABLE", "netaddress": "123.456.7.0", "prefix": 24, "netmask": "255.255.255.0", "gateway": "123.456.7.89" }, "type": "IPv4", "product": { "name": "vserver", "uuid": "lLPgX" }, "unix": { "created": "1607936226", "userchange": "1640311932" }, "settings": { "layer7": "only_off", "layer4": "dynamic", "rdns": null, "alert": true }, "customName": null }, "ipv6": { "uuid": "llw70", "ip": "2b1e:4201:a120:10a::135", "userid": 14810, "status": "GIVEN", "subnet": { "uuid": "B4W2uh", "status": "AVAILABLE", "netaddress": "2b1e:4201:a120:10a::", "prefix": 64, "netmask": "2b1e:4201:a120:10a::", "gateway": "2b1e:4201:a120:10a::1" }, "type": "IPv6", "product": { "name": "vserver", "uuid": "lLPgX" }, "unix": { "created": "1607936228", "userchange": "1640311932" }, "settings": { "layer7": "only_off", "layer4": "dynamic", "rdns": null, "alert": true }, "customName": null }, "unix": { "created": 1640311942 } } }, "additional": [] }, "private": [], "traffic": { "ingoing": 0, "outgoing": 0, "ingoingLast": 0, "outgoingLast": 0, "lastUnix": 0, "included": 2000, "reset": 1642903942 }, "bandwidth": { "amount": 750, "limited": false } } } ] }
Get single vserver
Lists a the single vserver
HTTP Request
GET https://api.dashserv.io/v1/product/vserver/{uuid}
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl 'https://api.dashserv.io/v1/product/vserver/lLPgX' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": { "uuid": "lLPgX", "userid": 14810, "name": "test", "options": { "ram": 2, "cores": 1, "disk": 40, "image": { "name": "debian10", "group": "debian", "displayName": "Debian 10", "version": "10", "type": "QEMU", "visible": true } }, "payment": { "uuid": "wKg2d", "state": "waiting", "type": "hourly", "price": 2.17, "customer": 14810, "period": null, "product": { "name": "vserver", "uuid": "lLPgX", "realName": null }, "data": null, "deletion": null, "autoRenew": false, "coupon": null, "unix": 1640311910, "transaction": { "last": null, "next": null }, "hourly": { "uuid": "YquJ7", "billed": false, "price": { "hourly": 0.00301, "monthly": 2.17, "hours": 22, "current": 0.06622 }, "payment": { "month": "12-2021", "start": 1640311910, "end": null }, "product": { "name": "vserver", "uuid": "lLPgX" } } }, "status": "OKAY", "image": { "name": "debian10", "group": "debian", "displayName": "Debian 10", "version": "10", "type": "QEMU", "visible": true }, "unix": 1640311942, "location": { "uuid": "kc7aV", "display": { "name": "Skylink, Eygelshoven", "country": "Niederlande", "advantages": [] }, "country": "NL", "location": { "latitude": 50.1223792, "longitude": 8.7425231 }, "priceMultiplier": 1 }, "limits": { "backups": 1, "snapshot": 5 }, "network": { "public": { "ipv4": { "uuid": "qGzRr", "ip": "123.456.7.89", "userid": 14810, "status": "GIVEN", "subnet": { "uuid": "vwf2WN", "status": "AVAILABLE", "netaddress": "123.456.7.0", "prefix": 24, "netmask": "255.255.255.0", "gateway": "123.456.7.89" }, "type": "IPv4", "product": { "name": "vserver", "uuid": "lLPgX" }, "unix": { "created": "1607936226", "userchange": "1640311932" }, "settings": { "layer7": "only_off", "layer4": "dynamic", "rdns": null, "alert": true }, "customName": null }, "ipv6": { "uuid": "llw70", "ip": "2b1e:4201:a120:10a::135", "userid": 14810, "status": "GIVEN", "subnet": { "uuid": "B4W2uh", "status": "AVAILABLE", "netaddress": "2b1e:4201:a120:10a::", "prefix": 64, "netmask": "2b1e:4201:a120:10a::", "gateway": "2b1e:4201:a120:10a::1" }, "type": "IPv6", "product": { "name": "vserver", "uuid": "lLPgX" }, "unix": { "created": "1607936228", "userchange": "1640311932" }, "settings": { "layer7": "only_off", "layer4": "dynamic", "rdns": null, "alert": true }, "customName": null }, "interfaces": { "net0": { "uuid": "uFSVB", "status": "ACTIVE", "name": "net0", "ipv4": { "uuid": "qGzRr", "ip": "123.456.7.89", "userid": 14810, "status": "GIVEN", "subnet": { "uuid": "vwf2WN", "status": "AVAILABLE", "netaddress": "123.456.7.0", "prefix": 24, "netmask": "255.255.255.0", "gateway": "123.456.7.89" }, "type": "IPv4", "product": { "name": "vserver", "uuid": "lLPgX" }, "unix": { "created": "1607936226", "userchange": "1640311932" }, "settings": { "layer7": "only_off", "layer4": "dynamic", "rdns": null, "alert": true }, "customName": null }, "ipv6": { "uuid": "llw70", "ip": "2b1e:4201:a120:10a::135", "userid": 14810, "status": "GIVEN", "subnet": { "uuid": "B4W2uh", "status": "AVAILABLE", "netaddress": "2b1e:4201:a120:10a::", "prefix": 64, "netmask": "2b1e:4201:a120:10a::", "gateway": "2b1e:4201:a120:10a::1" }, "type": "IPv6", "product": { "name": "vserver", "uuid": "lLPgX" }, "unix": { "created": "1607936228", "userchange": "1640311932" }, "settings": { "layer7": "only_off", "layer4": "dynamic", "rdns": null, "alert": true }, "customName": null }, "unix": { "created": 1640311942 } } }, "additional": [] }, "private": [], "traffic": { "ingoing": 0, "outgoing": 0, "ingoingLast": 0, "outgoingLast": 0, "lastUnix": 0, "included": 2000, "reset": 1642903942 }, "bandwidth": { "amount": 750, "limited": false } } } }
Get available images
Lists all available images for reinstallation
HTTP Request
GET https://api.dashserv.io/v1/product/vserver/image
curl 'https://api.dashserv.io/v1/product/vserver/image' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": [ { "name": "centos8", "group": "centos", "displayName": "CentOS 8", "version": "8", "type": "QEMU", "visible": true }, { "name": "debian10", "group": "debian", "displayName": "Debian 10", "version": "10", "type": "QEMU", "visible": true }, { "name": "debian11", "group": "debian", "displayName": "Debian 11 - Eingeschränkt", "version": "11", "type": "QEMU", "visible": true }, { "name": "fedora32", "group": "fedora", "displayName": "Fedora 32", "version": "32", "type": "QEMU", "visible": true }, { "name": "ubuntu16_04", "group": "ubuntu", "displayName": "Ubuntu 16.04", "version": "16.04", "type": "QEMU", "visible": true }, { "name": "ubuntu18_04", "group": "ubuntu", "displayName": "Ubuntu 18.04", "version": "18.04", "type": "QEMU", "visible": true }, { "name": "ubuntu19_10", "group": "ubuntu", "displayName": "Ubuntu 19.10", "version": "19.10", "type": "QEMU", "visible": true }, { "name": "ubuntu20_04", "group": "ubuntu", "displayName": "Ubuntu 20.04", "version": "20.04", "type": "QEMU", "visible": true }, { "name": "windows2019", "group": "windows", "displayName": "Windows Server 2019", "version": "2019", "type": "QEMU", "visible": true } ] }
Get status
Returns the status and stats of the vserver. If data->locked
is not false it will be a string
with the reason why vserver actions cant be executed at the moment. The locked state will automaticly revert
after some time.
HTTP Request
GET https://api.dashserv.io/v1/product/vserver/{uuid}/status
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl 'https://api.dashserv.io/v1/product/vserver/lLPgX/status' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": { "status": "online", "locked": false, "stats": { "uptime": 77062, "ram": { "max": 2147483648, "current": 334094336, "usage": 15.56 }, "disk": { "max": 42949672960, "current": 0, "write": 841129984, "read": 269785372 }, "cpu": { "cores": 1, "usage": 0 }, "network": { "limited": false, "ingoing": 59144058, "outgoing": 2588345, "traffic": { "ingoing": 0, "outgoing": 0 } } } } }
Change resources
This changes the resources of the vserver - only available for configured vserver. The vserver will automaticly restart if the operation was successfull. The pricing for upgrades can be taken from the current product pricing.
HTTP Request
PUT https://api.dashserv.io/v1/product/vserver/{uuid}/upgrade
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
cpu | int (required) | new amount of cpu cores |
ram | int (required) | new amount of gb ram |
disk | int (required) | new amount of GB disk - downgrade is not allowed |
curl -X PUT -F 'cpu=4' -F 'ram=16' -F 'disk=120' 'https://api.dashserv.io/v1/product/vserver/lLPgX/status' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "cannot_downgrade_disk" }
{ "success": true, "data": "upgrade_resources_exceeds_limit" }
{ "success": true, "data": "vserver_upgrade_success" }
Start server
Starts the vserver. This returns a task uuid you can monitor for success or errors.
HTTP Request
POST https://api.dashserv.io/v1/product/vserver/{uuid}/actions/start
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl -X POST 'https://api.dashserv.io/v1/product/vserver/lLPgX/actions/start' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "gAbgA" }
Shutdown server
Shutdowns the vserver using ACPI signal. This returns a task uuid you can monitor for success or errors.
HTTP Request
POST https://api.dashserv.io/v1/product/vserver/{uuid}/actions/shutdown
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl -X POST 'https://api.dashserv.io/v1/product/vserver/lLPgX/actions/shutdown' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "gAbgA" }
Force-shutdown server
Forcefully stops the vserver. This action is equivalent of pulling the power plug and may lead to data loss. This returns a task uuid you can monitor for success or errors.
HTTP Request
POST https://api.dashserv.io/v1/product/vserver/{uuid}/actions/stop
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl -X POST 'https://api.dashserv.io/v1/product/vserver/lLPgX/actions/stop' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "gAbgA" }
Gracefully restarts server
Gracefully restarts the vserver. First, shutdowns the vserver with an ACPI signal and boots again. This returns a task uuid you can monitor for success or errors.
HTTP Request
POST https://api.dashserv.io/v1/product/vserver/{uuid}/actions/restart
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl -X POST 'https://api.dashserv.io/v1/product/vserver/lLPgX/actions/restart' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "gAbgA" }
Forcefully reset server
Forcefully resets the vserver. This action is equivalent of pulling the power plug and putting it back in
and may lead to data loss.
This returns a task uuid you can monitor for success or errors.
HTTP Request
POST https://api.dashserv.io/v1/product/vserver/{uuid}/actions/reset
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl -X POST 'https://api.dashserv.io/v1/product/vserver/lLPgX/actions/reset' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "gAbgA" }
Reinstall vserver
This will override all data on the vserver with the new selected image. The vserver will get forcefully
stopped and then the new image will be written on the disk. This process may take some time. The
status of
the vserver will change from offline|online to installing.
This returns a task uuid you can monitor for success or errors
HTTP Request
POST https://api.dashserv.io/v1/product/vserver/{uuid}/reinstall
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
image | string (required) | uuid of the new image |
curl -X POST -F 'image=debian10' 'https://api.dashserv.io/v1/product/vserver/lLPgX/reinstall' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "gAbgA" }
Reset password
Reset the root password and will return the new generated password. The password will change without the need of a reboot using the qemu-guest-agent.
HTTP Request
POST https://api.dashserv.io/v1/product/vserver/{uuid}/password
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl -X POST 'https://api.dashserv.io/v1/product/vserver/lLPgX/password' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "yYD94GAnTJC761dT" }
List backups
Lists all available backups of the vserver. If a backup is creating, the percentage will show the current creation progress.
HTTP Request
GET https://api.dashserv.io/v1/product/vserver/{uuid}/backup
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl 'https://api.dashserv.io/v1/product/vserver/lLPgX/backup' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": [ { "uuid": "Nl8cU", "status": "CREATING", "percentage": 1, "name": "testbackup", "size": 0, "unix": { "created": 1640389665, "finished": null } } ] }
Create backup
Creates a new backup. If the limit of backups for the vserver is reached, the oldest one will get deleted.
HTTP Request
POST https://api.dashserv.io/v1/product/vserver/{uuid}/backup
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
name | string (required) | name of the backup |
curl -X POST -F 'name=testbackup' 'https://api.dashserv.io/v1/product/vserver/lLPgX/backup' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "vserver_create_backup_success" }
Delete backup
Deletes a backup
HTTP Request
DELETE https://api.dashserv.io/v1/product/vserver/{uuid}/backup/{backupUuid}
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
backupUuid | string (required) | uuid of the backup |
curl -X DELETE 'https://api.dashserv.io/v1/product/vserver/lLPgX/backup/Nl8cU' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "vserver_delete_backup_success" }
Restore backup
Restores a backup. The locked parameter of the status will be enabled and disabled once the restore process has finished.
HTTP Request
PUT https://api.dashserv.io/v1/product/vserver/{uuid}/backup/{backupUuid}
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
backupUuid | string (required) | uuid of the backup |
curl -X PUT 'https://api.dashserv.io/v1/product/vserver/lLPgX/backup/Nl8cU' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "vserver_restore_backup_success" }
Get tasks
Returns all tasks of the vserver. unix.end
is null if the task is still running.
HTTP Request
GET https://api.dashserv.io/v1/product/vserver/{uuid}/tasks
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl 'https://api.dashserv.io/v1/product/vserver/lLPgX/tasks' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": [ { "unix": { "start": 1647438602, "end": 1647440751 }, "task": "backup_create", "status": "OK" }, { "unix": { "start": 1647434339, "end": 1647434340 }, "task": "start", "status": "OK" }, { "unix": { "start": 1647434337, "end": 1647434338 }, "task": "reboot", "status": "OK" } ] }
Get scheduled tasks
Returns all scheduled tasks of the vserver.
HTTP Request
GET https://api.dashserv.io/v1/product/vserver/{uuid}/tasks/scheduled
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
curl -X PUT 'https://api.dashserv.io/v1/product/vserver/lLPgX/tasks/scheduled' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": [ { "uuid": "7idOS", "status": "ACTIVE", "interval": "DAILY", "command": "BACKUP", "unix": { "created": 1647505302, "execution": { "last": null, "next": 1647591660 } } } ] }
Create scheduled task
Creates a scheduled task for the vserver. Available intervals:
DAILY,
TWODAYS,
THREEDAYS,
WEEKLY,
TWOWEEKS,
MONTHLY,
TWOMONTHS,
THREEMONTHS,
SIXMONTHS,
YEARLY
Available commands:
RESTART,
BACKUP,
SHUTDOWN,
START
HTTP Request
POST https://api.dashserv.io/v1/product/vserver/{uuid}/tasks/scheduled
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
interval | string (required) | the interval the command should be executed |
command | string (required) | the command that should be executed |
nextexecution | timestamp | The first execution. Leave empty to set to now |
curl -X POST -F 'interval=DAILY' -F 'command=BACKUP' -F 'nextexecution="18.03.2022 09:21"' 'https://api.dashserv.io/v1/product/vserver/lLPgX/tasks/scheduled' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "vserver_scheduled_task_create_success" }
Delete scheduled task
HTTP Request
DELETE https://api.dashserv.io/v1/product/vserver/{uuid}/tasks/scheduled
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
taskuuid | string (required) | the uuid of the scheduled task |
curl -X DELETE -F 'taskuuid=7idOS' 'https://api.dashserv.io/v1/product/vserver/lLPgX/tasks/scheduled' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": "vserver_scheduled_task_delete_success" }
Get graphs
HTTP Request
GET https://api.dashserv.io/v1/product/vserver/{uuid}/stats
Parameter
Parameter | Type | Description |
---|---|---|
uuid | string (required) | product uuid |
timeframe | string (required) | allowed values: hour, day, week, month, year |
curl 'https://api.dashserv.io/v1/product/vserver/lLPgX/stats?timeframe=hour' \
-H "Authorization: Bearer nbzFiujNy2wfX51z81bjDJLjKHlwUfBV"
{ "success": true, "data": [ { "cpu_percentage": 0.1, "ram_percentage": 65.2, "net_in": 828.07, "net_out": 82.63, "disk_read": 0, "disk_write": 1624.75, "time": "08:18:00" }, { "cpu_percentage": 0.1, "ram_percentage": 65.2, "net_in": 723.06, "net_out": 72.29, "disk_read": 0, "disk_write": 942.08, "time": "08:19:00" } ] }