NAV
bash javascript

Introduction

General

This HTTP REST API allows you to manage your services. All API returns used JSON format.

Credentials

This API use Basic HTTP Authentication. Please find your API Id and API Key on the customer's panel.

URL

https://api.dedimax.com/api/2.0

Dedicated

GET /dedicated

list all dedicated servers

Example request:

curl -u API_ID:API_KEY GET "https://api.dedimax.com/api/2.0/dedicated" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://localhost/api/2.0/dedicated",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
   11111,
   22222,
   33333
]

HTTP Request

GET api/2.0/dedicated

GET /dedicated/{id}

get dedicated server details

Example request:

curl -u API_ID:API_KEY GET "https://api.dedimax.com/api/2.0/dedicated/{id}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/dedicated/{id}",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "sd": 11111,
   "cpu": "Intel Xeon E3-1230v2 3.20Ghz",
   "hdd": "4x3TB",
   "hddtype": "SATA",
   "ram": "16GB",
   "bw": "1Gbps",
   "location": "Paris, FR",
   "ip": "127.0.0.1",
   "endofterm": "2028-02-28",
   "alias": "AwesomeServer"
}

HTTP Request

GET api/2.0/dedicated/{id}

Parameters

Parameter Type Description
id int Service ID

GET /dedicated/{id}/templates

get list of templates available

Example request:

curl -u API_ID:API_KEY GET "https://api.dedimax.com/api/2.0/dedicated/{id}/templates" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/dedicated/{id}/templates",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
   {
       "od_id": 1,
       "os_name": "CentOS 7.x",
       "arch": "x86_64"
   },
   {
       "os_id": 2,
       "os_name": "Centos 6.x",
       "arch":"x86_64"
   }
]

HTTP Request

GET api/2.0/dedicated/{id}/templates

Parameters

Parameter Type Description
id int Service ID

POST /dedicated/{id}/alias

set the server's alias

Example request:

curl -u API_ID:API_KEY POST "https://api.dedimax.com/api/2.0/dedicated/{id}/alias" \
-H "Accept: application/json" -d alias="MyAwesomeServer"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/dedicated/{id}/alias",
    "method": "POST",
    "data" : {
       'alias': 'MyAwesomeServer'
    },
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "result": "success"
}

HTTP Request

POST api/2.0/dedicated/{id}/alias

Parameters

Parameter Type Description
id int Service ID
alias string Alias

GET /dedicated/{id}/hostname

the server's hostname

Example request:

curl -u API_ID:API_KEY GET "https://api.dedimax.com/api/2.0/dedicated/{id}/hostname" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/dedicated/{id}/hostname",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "hostname": "sd11111"
}

HTTP Request

GET api/2.0/dedicated/{id}/hostname

Parameters

Parameter Type Description
id int Service ID

POST /dedicated/{id}/hostname

set the server's hostname

Example request:

curl -u API_ID:API_KEY POST "https://api.dedimax.com/api/2.0/dedicated/{id}/hostname" \
-H "Accept: application/json" -d hostname="YourHostname"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/dedicated/{id}/hostname",
    "method": "POST",
    "data" : {
       'hostname': 'YourHostname'
    },
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "result": "success"
}

HTTP Request

POST api/2.0/dedicated/{id}/hostname

Parameters

Parameter Type Description
id int Service ID
hostname string Hostname

POST /dedicated/{id}/shutdown

power off the server

Example request:

curl -u API_ID:API_KEY POST "https://api.dedimax.com/api/2.0/dedicated/{id}/shutdown" \
-H "Accept: application/json" -d reason="ping down"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/dedicated/{id}/shutdown",
    "method": "POST",
    "data" : {
       'reason': 'ping down'
    },
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "result": "success"
}

HTTP Request

POST api/2.0/dedicated/{id}/shutdown

Parameters

Parameter Type Description
id int Service ID
reason string Reason

POST /dedicated/{id}/reboot

power cycle

Example request:

curl -u API_ID:API_KEY POST "https://api.dedimax.com/api/2.0/dedicated/{id}/restart" \
-H "Accept: application/json" -d reason="ping down"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/dedicated/{id}/restart",
    "method": "POST",
    "data" : {
       'reason': 'ping down'
    },
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "result": "success"
}

HTTP Request

POST api/2.0/dedicated/{id}/restart

Parameters

Parameter Type Description
id int Service ID
reason string Reason

GET /dedicated/{id}/rescuetemplates

list rescue templates

Example request:

curl -u API_ID:API_KEY GET "https://api.dedimax.com/api/2.0/dedicated/{id}/rescuetemplates" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/dedicated/{id}/rescuetemplates",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "rescue_templates": [
      "ubuntu-14.04_amd64",
      "freebsd_11.0_amd64"
   ]
}

HTTP Request

GET api/2.0/dedicated/{id}/rescuetemplates

Parameters

Parameter Type Description
id int Service ID

POST /dedicated/{id}/bootnormal

change the boot mode to normal (hdd)

Example request:

curl -u API_ID:API_KEY POST "https://api.dedimax.com/api/2.0/dedicated/{id}/bootnormal" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/dedicated/{id}/bootnormal",
    "method": "POST",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "result": "success"
}

HTTP Request

POST api/2.0/dedicated/{id}/bootnormal

Parameters

Parameter Type Description
id int Service ID

POST /dedicated/{id}/bootrescue

change the boot mode to rescue

Example request:

curl -u API_ID:API_KEY POST "https://api.dedimax.com/api/2.0/dedicated/{id}/bootrescue" \
-H "Accept: application/json" -d template="RescueTemplateName"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/dedicated/{id}/bootrescue",
    "method": "POST",
    "data" : {
       'template': 'RescueTemplateName'
    },
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "result": "success"
}

HTTP Request

POST api/2.0/dedicated/{id}/bootrescue

Parameters

Parameter Type Description
id int Service ID
template string Rescue template's name

GET /dedicated/{id}/rescuecredentials

get rescue credentials (in rescue mode only)

Example request:

curl -u API_ID:API_KEY GET "https://api.dedimax.com/api/2.0/dedicated/{id}/rescuecredentials" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/dedicated/{id}/rescuecredentials",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "rescue_credentials": {
       "login": "john",
       "password": "xxxxxxxx",
       "protocol": "ssh",
       "ip": "127.0.0.1"
   }
}

HTTP Request

GET api/2.0/dedicated/{id}/rescuecredentials

Parameters

Parameter Type Description
id int Service ID

POST /dedicated/{id}/ipmi

create an ipmi session

Example request:

curl -u API_ID:API_KEY POST "https://api.dedimax.com/api/2.0/dedicated/{id}/ipmi" \
-H "Accept: application/json" -d ip="127.0.0.1"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/dedicated/{id}/ipmi",
    "method": "POST",
    "data" : {
       'ip': '127.0.0.1'
    },
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "result": "success"
}

HTTP Request

POST api/2.0/dedicated/{id}/ipmi

Parameters

Parameter Type Description
id int Service ID
ip string Your personnal IP

GET /dedicated/{id}/ipmicredentials

get ipmi credentials (if ipmi is requested only)

Example request:

curl -u API_ID:API_KEY GET "https://api.dedimax.com/api/2.0/dedicated/{id}/ipmicredentials" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/dedicated/{id}/ipmicredentials",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "ipmi_credentials:" {
       "url": "http://127.0.0.1/",
       "login": "john",
       "password": "xxxxx",
       "expiration": "2028-07-12 16:20:07 GMT"
    }
}

HTTP Request

GET api/2.0/dedicated/{id}/ipmicredentials

Parameters

Parameter Type Description
id int Service ID

DELETE /dedicated/{id}/ipmi

delete an ipmi session

Example request:

curl -u API_ID:API_KEY DELETE "https://api.dedimax.com/api/2.0/dedicated/{id}/ipmi" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/dedicated/{id}/ipmi",
    "method": "DELETE",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "result": "success"
}

HTTP Request

DELETE api/2.0/dedicated/{id}/ipmi

Parameters

Parameter Type Description
id int Service ID

GET /dedicated/{id}/ip

list ips attached to the server

Example request:

curl -u API_ID:API_KEY GET "https://api.dedimax.com/api/2.0/dedicated/{id}/ip" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/dedicated/{id}/ip",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
   {
      "ip": "127.0.0.1",
      "type": "public",
      "reverse": "127.0.0.1.my.awesome.server.com.",
      "mac": "aa:bb:cc:dd:ee:ff"
    }
]

HTTP Request

GET api/2.0/dedicated/{id}/ip

Parameters

Parameter Type Description
id int Service ID

POST /dedicated/{id}/ip/reverse

set ip reverse

Example request:

curl -u API_ID:API_KEY POST "https://api.dedimax.com/api/2.0/dedicated/{id}/ip/reverse" \
-H "Accept: application/json" -d reverse="127.0.0.1.my.awesome.server.com."
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/dedicated/{id}/ip/reverse",
    "method": "POST",
    "data" : {
       'reverse': '127.0.0.1.my.awesome.server.com.'
    },
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "result": "success"
}

HTTP Request

POST api/2.0/dedicated/{id}/ip/reverse

Parameters

Parameter Type Description
id int Service ID
reverse string Reverse

POST /dedicated/{id}/reinstall

Launch reinstall process

Example request:

curl -u API_ID:API_KEY POST "https://api.dedimax.com/api/2.0/dedicated/{id}/reinstall" \
-H "Accept: application/json" -d os_id="87"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/dedicated/{id}/reinstall",
    "method": "POST",
    "data" : {
       'os_id': '87'
    },
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "login": "john",
   "user_password": "xxxxxx",
   "root_password": "xxxxxx"
}

HTTP Request

POST api/2.0/dedicated/{id}/reinstall

Parameters

Parameter Type Description
id int Service ID
os_id int OS ID (from GET /dedicated/{id}/templates)

Order

GET /order/vps

list Private Virtual Server offers

Example request:

curl -u API_ID:API_KEY GET "https://api.dedimax.com/api/2.0/order/vps" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/order/vps",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
   {
       "id": 1,
       "name":"VPS_PRO1",
       "vcore":"1",
       "hdd":"100",
       "ram":"1024",
       "ip":"1",
       "bw":"200",
       "price":3.99,
       "available":1
   },
   {
       "id":2,
       "name":"VPS_PRO2",
       "vcore":"1",
       "hdd":"100",
       "ram":"2048",
       "ip":"1",
       "bw":"200",
       "price":6.99,
       "available":1
   }
]

HTTP Request

GET api/2.0/order/vps

GET /order/vps/addons

list Private Virtual Server add-ons offers

Example request:

curl -u API_ID:API_KEY GET "https://api.dedimax.com/api/2.0/order/vps/addons" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/order/vps/addons",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
   {
       "id": 1,
       "name":"IP",
       "price":3.99,
       "available":1
   }
]

HTTP Request

GET api/2.0/order/vps/addons

GET /order/dedicated

list dedicated servers offers

Example request:

curl -u API_ID:API_KEY GET "https://api.dedimax.com/api/2.0/order/dedicated" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/order/dedicated",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
   {
       "id": 1,
       "location": "Paris, FR",
       "cpu": "VIA NANO U2250 1.6GHz",
       "hdd": "1 x 160 GB",
       "hdd_type": "SATA",
       "ram": "2GB",
       "ip": "1",
       "bw": "1Gbps",
       "price": 6.99,
       "available": "0"
   },
   {
       "id": 17718,
       "location": "Paris, FR",
       "cpu": "Intel Atom D425",
       "hdd": "500 GB",
       "hdd_type": "SATA",
       "ram": "2GB",
       "ip": "1",
       "bw": "100 Mbps",
       "price": 9.99,
       "available": "1"
   }
]

HTTP Request

GET api/2.0/order/dedicated

GET /order/dedicated/addons/{id}

list dedicated servers add-ons offers

Example request:

curl -u API_ID:API_KEY GET "https://api.dedimax.com/api/2.0/order/dedicated/addons/{id}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/order/dedicated/addons/{id}",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
   {
       "id": 1,
       "name": "IP Failover",
       "price": 2.5,
       "setup_price": 3,
       "available": 1
   }
]

HTTP Request

GET api/2.0/order/dedicated/addons/{id}

Parameters

Parameter Type Description
id int Service ID

User

GET /user

Description

User details

Example request:

curl -u API_ID:API_KEY GET "https://api.dedimax.com/api/2.0/user" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/user",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "username": "johndoe",
    "lastname": "Doe",
    "firstname": "John",
    "email": "johndoe@dedimax.com"
}

HTTP Request

GET api/2.0/user

Vps

GET /vps

list all virtual private server

Example request:

curl -u API_ID:API_KEY GET "https://api.dedimax.com/api/2.0/vps" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/vps",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
   11111,
   22222,
   33333
]

HTTP Request

GET api/2.0/vps

GET /vps/templates

get list of templates available

Example request:

curl -u API_ID:API_KEY GET "https://api.dedimax.com/api/2.0/vps/templates" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/vps/templates",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
   {
      "os": "centos-7-x86_64-minimal",
      "description": "CentOS 7 64 bit",
      "arch": "x86_64"
   },
   {
      "os": "debian-9-x86_minimal",
      "description": "Debian 9 32 bit",
      "arch": "x86"
   }
]

HTTP Request

GET api/2.0/vps/templates

GET /vps/{id}

get virtual private server details

Example request:

curl -u API_ID:API_KEY GET "https://api.dedimax.com/api/2.0/vps/{id}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/vps/{id}",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "vps": 11111,
   "offer": 2,
   "endofterm": "2028-02-28",
   "ip": "255.255.255.255",
   "alias": "vps11111",
   "status":"online",
   "node": "box29",
   "ram_used": "277098496",
   "hdd_used":"1255800832"
}

HTTP Request

GET api/2.0/vps/{id}

Parameters

Parameter Type Description
id int Service ID

POST /vps/{id}/start

power on the virtual private server

Example request:

curl -u API_ID:API_KEY POST "https://api.dedimax.com/api/2.0/vps/{id}/start" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/vps/{id}/start",
    "method": "POST",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "result": "success"
}

HTTP Request

POST api/2.0/vps/{id}/start

Parameters

Parameter Type Description
id int Service ID

POST /vps/{id}/shutdown

power off the virtual private server

Example request:

curl -u API_ID:API_KEY POST "https://api.dedimax.com/api/2.0/vps/{id}/shutdown" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/vps/{id}/shutdown",
    "method": "POST",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "result": "success"
}

HTTP Request

POST api/2.0/vps/{id}/shutdown

Parameters

Parameter Type Description
id int Service ID

POST /vps/{id}/reboot

power cycle the virtual private server

Example request:

curl -u API_ID:API_KEY POST "https://api.dedimax.com/api/2.0/vps/{id}/restart" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/vps/{id}/restart",
    "method": "POST",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "result": "success"
}

HTTP Request

POST api/2.0/vps/{id}/restart

Parameters

Parameter Type Description
id int Service ID

POST /vps/{id}/tunenable

enable TUN module

Example request:

curl -u API_ID:API_KEY POST "https://api.dedimax.com/api/2.0/vps/{id}/tunenable" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/vps/{id}/tunenable",
    "method": "POST",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "result": "success"
}

HTTP Request

POST api/2.0/vps/{id}/tunenable

Parameters

Parameter Type Description
id int Service ID

POST /vps/{id}/tundisable

disable TUN module

Example request:

curl -u API_ID:API_KEY POST "https://api.dedimax.com/api/2.0/vps/{id}/tundisable" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/vps/{id}/tundisable",
    "method": "POST",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "result": "success"
}

HTTP Request

POST api/2.0/vps/{id}/tundisable

Parameters

Parameter Type Description
id int Service ID

POST /vps/{id}/rootpassword

Description

set root password

Example request:

curl -u API_ID:API_KEY POST "https://api.dedimax.com/api/2.0/vps/{id}/rootpassword" \
-H "Accept: application/json" -d "password"="xxxxxxx"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/vps/{id}/rootpassword",
    "method": "POST",
    "data" : {
       'password': 'xxxxxxx'
    },
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "result": "success"
}

HTTP Request

POST api/2.0/vps/{id}/rootpassword

Parameters

Parameter Type Description
id int Service ID
password string New Root Password

POST /vps/{id}/reinstall

launch reinstall process

Example request:

curl -u API_ID:API_KEY POST "https://api.dedimax.com/api/2.0/vps/{id}/reinstall" \
-H "Accept: application/json" -d template="ubuntu-16.04-x86_64"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/vps/{id}/reinstall",
    "method": "POST",
    "data" : {
       'template': 'ubuntu-16.04-x86_64'
    },
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "result": "success"
}

HTTP Request

POST api/2.0/vps/{id}/reinstall

Parameters

Parameter Type Description
id int Service ID
template string OS Name (from GET /vps/templates)

GET /vps/{id}/ip

Description

get the IPs list

Example request:

curl -u API_ID:API_KEY GET "https://api.dedimax.com/api/2.0/vps/{id}/ip" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/vps/{id}/ip",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
   "127.0.0.1"
]

HTTP Request

GET api/2.0/vps/{id}/ip

Parameters

Parameter Type Description
id int Service ID

POST /vps/{id}/alias

Description

Set alias to the virtual private server

Example request:

curl -u API_ID:API_KEY POST "https://api.dedimax.com/api/2.0/vps/{id}/alias" \
-H "Accept: application/json" -d alias="MyAwesomeVPS"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.dedimax.com/api/2.0/vps/{id}/alias",
    "method": "POST",
    "data" : {
       'alias': 'MyAwesomeVPS'
    },
    "headers": {
        "accept": "application/json",
        "Authorization": "Basic API_ID:API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
   "result": "success"
}

HTTP Request

POST api/2.0/vps/{id}/alias

Parameters

Parameter Type Description
id int Service ID
alias string Alias

Errors

This API uses the following error codes:

Error Code Meaning
400 Bad Request
401 Invalid Credentials
403 Not Authorized
404 Not Found
406 Incorrect Values
500 Internal Server Error -- Try again later.