API RU VDS


Getting started
 
Users
 
Servers
API functions
By default, the function returns information about all of your servers. If you want to get information only about certain servers, you can add their IDs (strongly recommended).
URL: https://ruvds.com/api/servers/
Query Parameters:
sessionToken – token received after authentication
userId – user ID required to get servers (if available)
fields – A list of property names, separated by commas (,) or semicolons (;), of the item object, the value of which is need to be obtained; if the parameter is not specified or the list is empty, all available fileds are displayed
id – requested servers IDs, separated by commas
Request Example:
https://ruvds.com/api/servers/?sessionToken=YOURTOKEN&id=
Response Example:
{
"rejectReason": 0,
"items":
[
{
"id": 38420,
"cpu": 2,
"ram": 2,
"vram": 64,
"drive": [ {"type":1,"capacity":60 } ],
"ip":
{
"count": 1,
"assigned": [ "192.168.111.222" ],
},
"premium": false,
"tariff":
{
"premium": false,
"id": 4,
"cpu": 60,
"ram": 140,
"vram": 1.953125,
"drive": {"hdd":5,"ssd":20 },
"ip": 100,
"active": true
},
"priceRub": 693,
"additionalServices":
[
{
"count": 1,
"name": "DDoS protection",
"price": 400,
"applyDiscount": true,
"monthIsMin": true
}
],
"paymentPeriod": 3,
"discount":
{
"paymentPeriod": 0.05,
"promocode": 0.1
},
"state": 100,
"addDT": "07022016092512",
"createDT": "07022016092850",
"createProgress": 100,
"createState": 100,
"defaultAdminPassword": "eCvpQmXh",
"configurationUpdating": false,
"limitedTrafficMbps": null,
"running": true,
"paid": true,
"paidTill": "07042016092850",
"stat":
{
"traffic": {"value":21,"limit":153600,"state":1 },
"trafficOutbound": {"value":5,"limit":null,"state":1 },
"trafficInbound": {"value":16,"limit":null,"state":1 },
"driveRead": 938,
"driveWritten": 263,
"avgIOPS": 5,
"avgCPU": 0
},
"notifications":
[
{
"id": 3829,
"type": 3,
"blocked": true,
"message": "<div style="margin-bottom:6px;">High incoming junk traffic detected: <b>83 Gb</b></div><div style="margin-bottom:6px;">It can lead to…",
"dt": "19022016175602"
}
],
"configurationChangeable": true,
"canRecreate": true
}
]
}
Response Example:
rejectReason – numeric value (error code)
errMessage – error description, if occured
items – server array
id – server RuVDS system ID (assigns name RUXXXX to server)
cpu – CPU cores number
ram – total RAM, GB
vram – graphics memory, MB
drive – hard drives installed,their type (1 - HDD, 3 - SSD) and capacity, GB
ip – server IP addresses info
count – number of IP addresses requested
assigned – assigned IP addresses structure
premium – premium server, yes/no
tariff – price plan info
premium – premium price plan, yes/no
id – RuVDS system price plan ID
cpu – price of one CPU core (RUB)
ram – 1 GB RAM price (RUB)
vram – 1 MB VRAM price (RUB)
drive – 1 GB of disk space price (RUB) and options available (HDD, SSD)
ip – price 1 of extra IP address (RUB). 1 IP per server is free
active – price plan active, yes/no
priceRub – the full cost of the server, including additional services, for the payment period, including promo code and payment period discounts
additionalServices – additional services activated for this server
count – amount activated
name – service name
price – service price per month, without discounts
applyDiscount – service discounts available, yes/no
monthIsMin – if TRUE, min billing period is one month and no refund is available with early termination
paymentPeriod – 1 - trial period; 2 - 1 month; 3 - 3 months; 4 - 6 months; 5 - 1 year
discount – server discounts, NULL if none are available
paymentPeriod – discount for selected payment period, %
promocode – promo code discount, %
state – 1 - new; 2 - configured; 3 - contact details not confirmed; 4 - no resources available; 5 - not paid; 6 - blocked for violation; 100 - ready
addDT – date and time added (UTC, ddMMyyyyHHmmss format)
createDT – creation completion date and time (UTC, ddMMyyyyHHmmss format), NULL if not created
createProgress – server creation status (from 0 to 100)
createState – 1 – waiting; 2 - started; 3 - copying files; 4 - system launch; 5 - configuration; 6 - reboot; 100 - completed
defaultAdminPassword – default password for Administrator
configurationUpdating – server reconfiguration ongoing, yes/no
limitedTrafficMbps – traffic limit set (Mbps)
running – server running, yes/no
paid – server paid, yes/no
paidTill – server paid until (UTC, ddMMyyyyHHmmss format)
stat – basic info on resource usage; state: 1 – optimal load; 2 - load close to limit; 3 - load limit exceeded
traffic – total traffic, 24 hrs, MB
trafficOutbound – outgoing traffic, 24 hrs, MB
trafficInbound – incoming traffic, 24 hrs, MB
driveRead – disk data read, 24 hrs, MB
driveWritten – disk data written, 24 hrs, MB
avgIOPS – average disk load, 24 hrs, IOPS
avgCPU – average CPU load, 24 hrs, (from 0 to 100)
notifications – server notifications
id – notification system ID
type – 1 - info; 2 - warning; 3 - violation
blocked – notification led to blocking, yes/no
message – notification HTML text
dt – notification date and time (UTC, ddMMyyyyHHmmss format)
configurationChangeable – reconfiguration possible, yes/no
canRecreate – server recreation from scratch available, yes/no
userComment – user comment
Error Codes:
0 – request successfully completed
1 – invalid authentication token
2 – authentication token not specified
100 – internal system error

The function allows you to retrieve data for load charts, similar to those displayed on your account page.
Request is only possible for one server at a time.
URL: https://ruvds.com/api/server/stat/
Query Parameters:
sessionToken – token received after authentication
id – ID of server you want to get stats for
Request Example:
https://ruvds.com/api/server/stat/?sessionToken=YOURTOKEN&id=38420
Response Example:
{
"rejectReason": 0,
"id": 38420,
"cpu":
[
{
"date": "19022016",
"avgLoad": 0
},
{
"date": "20022016",
"avgLoad": 1
}
],
"drive":
[
{
"date": "19022016",
"read": 52,
"write": 5,
"avgIOPS": 1
},
{
"date": "20022016",
"read": 52,
"write": 6,
"avgIOPS": 1
}
],
"traffic":
[
{
"date": "19022016",
"inbound": 0,
"outbound": 0
},
{
"date": "20022016",
"inbound": 8,
"outbound": 1
}
]
}
Response Fields:
rejectReason – numeric value (error code)
errMessage – error description, if occured
id – ID of server you requested stats for
cpu – daily CPU load info
date – day (UTC, ddMMyyyy format)
avgLoad – average total CPU load (from 0 to 100)
drive – daily disk load info
date – day (UTC, ddMMyyyy format)
read – total data read, MB
write – total data written, MB
avgIOPS – average disk load, IOPS
traffic – daily traffic info
date – day (UTC, ddMMyyyy format)
inbound – incoming traffic, MB
outbound – outgoing traffic, MB
Error Codes:
0 – request successfully completed
1 – invalid authentication token
2 – authentication token not specified
4 – virtual server not found by ID
100 – internal system error

The function allows you to receive up-to-date server screenshots. Available width: from 64 to 640, height: from 48 to 480.
As the results are cached, you should not request the image more than once per 10 seconds.
URL: https://ruvds.com/api/server/image/
Query Parameters:
sessionToken – token received after authentication
id – ID of server you want to screenshot
width – image width
height – image height
Request Example:
https://ruvds.com/api/server/image/?sessionToken=YOURTOKEN&id=38420
&width=340&height=240
Response Example:
{
"rejectReason": 0,
"id": 38420,
"state": 100,
"running": true,
"imageBase64": "/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAg..."
}
Response Fields:
rejectReason – numeric value (error code)
errMessage – error description, if occured
id – ID of server you requested screenshot for
state – 1 - new; 2 - configured; 3 - contact details not confirmed; 4 - no resources available; 5 - not paid; 6 - blocked for violation; 100 - ready
running – server running, yes/no
imageBase64 – image byte array in Base64 format
If state field value is not equal to 100 or running field value is not equal to true, then field imageBase64 will see the return of NULL.
Error Codes:
0 – request successfully completed
1 – invalid authentication token
2 – authentication token not specified
4 – virtual server not found by ID
100 – internal system error

As system copying and configuring creates a major workload for drive system, please create SSD-based servers when debugging. But even with SSD, please keep the number of requests to a minimum.
If you create and then delete more than 10 servers in 24 hrs, you may be temporarily barred from creating new servers.
URL: https://ruvds.com/api/server/create/
Query Parameters:
sessionToken – token received after authentication
userId – ID of user you want to create server for (if available)
datacenter – datacenter identifier (see Getting Started > Dataсenters)
tariff – tariff plan identifier (see Getting Started> Tariff Plans)
os – operating system identifier (see Getting Started > Operating Systems) [optional filed]
cpu – CPU cores number
ram – total RAM, GB
vram – graphics memory, MB (available values: 0, 64, 128, 256, 512, 1024)
drivesCount – number of virtual server drives
driveXTariff – tariff plan identifier (see Getting Started> Tariff Plans), where X - [0..drivesCount-1]
driveXСapacity – disk capacity in GB, where X - [0..drivesCount-1]
driveXSystem – a flag that indicates that an operating system will be installed on this disk (if several are specified, the latter will be selected as the system one), where X - [0..drivesCount-1]
ip – number of IP addresses required
ddosProtection – if server DDoS protection is required, then specify bandwidth for legitimate incoming traffic, divisible by 0.5 Mbps
template – operating system installation template ID (if available)
paymentPeriod – 2 - 1 month; 3 - 3 months; 4 - 6 months; 5 - 1 year
promocode – promo code for fixed discount
promo – promo configuration identifier; not recommended to use, can be changed without notice; send a request to the technical support service to clarify current promo list; promotional configuration can prohibit any promotional codes using, including PROMO-API
computerName – computer name for virtual server created. If not specified, default name WIN-XXXXXXX is assigned
userComment – user comment
Request Example:
https://ruvds.com/api/server/create/?sessionToken=YOURTOKEN&datacenter=1&tariff=14&os=15&cpu=2
&ram=4&vram=0&drivesCount=1&drive0Tariff=1&drive0Capacity=40&drive0System=true&ip=1
&ddosProtection=0&paymentPeriod=2&promocode=PROMO-API&computerName=CustomVDS
Response Example:
{
"rejectReason": 0,
"id": 38420,
"cost": 279
}
Response Fields:
rejectReason – numeric value (error code)
errMessage – error description, if occured
id – new server ID
cost – server price for selected period with all discounts applied (RUB)
After receiving a successful response from the system, creation of a virtual server is started. It can be monitored by requesting server info as described above in My Servers.
Error Codes:
0 – request successfully completed
1 – invalid authentication token
2 – incorrect number of CPU cores
3 – incorrect RAM data
4 – incorrect hard disk capacity
5 – incorrect number of IP addresses
6 – user or promo code not found
7 – cannot detect current price plan (internal system error)
8 – an error occured while saving data (internal system error)
10 – server creation is not available for your account
13 – cannot create new server
17 – no resources available for the desired configuration
19 – insufficient funds
31 – authentication token not specified
33 – invalid characters in the computer name
39 – incorrect graphics memory
100 – internal system error

Reconfiguration is asynchronous. After a successful response from the system, the configuration can still remain unchanged and would not be changed if errors occur.
On receiving a successful response, you can track server status and its configuration through configurationUpdating field, as described above in My Servers. If configurationUpdating field value becomes false and configuration is still unchanged, then an error has occurred.
URL: https://ruvds.com/api/server/update/configuration/
Query Parameters:
sessionToken – token received after authentication
id – ID of server you want to make changes to
cpu – CPU cores number
ram – total RAM, GB
vram – graphics memory, MB (available values: 0, 64, 128, 256, 512, 1024)
drive – disk capacity, GB
ip – number of IP addresses required
ddosProtection – if server DDoS protection is required, then specify bandwidth for legitimate incoming traffic, divisible by 0.5 Mbps
Request Example:
https://ruvds.com/api/server/update/configuration/?sessionToken=YOURTOKEN&id=38420
&cpu=2&ram=2&vram=128&drive=40&ip=2&ddosProtection=0.5
Response Example:
{
"rejectReason": 0
}
Response Fields:
rejectReason – numeric value (error code)
errMessage – error description, if occured
Error Codes:
0 – request successfully completed
1 – invalid authentication token
2 – incorrect number of CPU cores
3 – incorrect RAM data
4 – incorrect hard disk capacity
5 – incorrect number of IP addresses
6 – virtual server not found by ID
10 – Server reconfiguration prohibited on this account
13 – server inactive
14 – reconfiguration ongoing
15 – current billing period will expire in less than 30 minutes, reconfiguration is not possible
16 – current billing period has expired
17 – no resources available for the desired configuration
19 – insufficient funds
20 – you’ve reached the daily limit of reconfigurations for this server
21 – you’ve reached the monthly limit of reconfigurations for this server
26 – reconfiguration is not available for this server
31 – authentication token not specified
39 – incorrect graphics memory
100 – internal system error

As with changing billing period through user account, execution of this function does not entail withdrawal of funds. The server will be prolonged for the new period only when current billing period ends.
URL: https://ruvds.com/api/server/update/payment_period/
Query Parameters:
sessionToken – token received after authentication
id – ID of server you want to make changes to
paymentPeriod – 2 - 1 month; 3 - 3 months; 4 - 6 months; 5 - 1 year
Request Example:
https://ruvds.com/api/server/update/payment_period/?sessionToken=YOURTOKEN&id=38420
&paymentPeriod=2
Response Example:
{
"rejectReason": 0
}
Response Fields:
rejectReason – numeric value (error code)
errMessage – error description, if occured
Error Codes:
0 – request successfully completed
1 – invalid authentication token
2 – authentication token not specified
4 – virtual server not found by ID
8 – reconfiguration ongoing
100 – internal system error

This function includes a variety of simple tasks, including switching on/off, reboot, shutdown, generating new administrator password, server recreation (system reset), removal.
All functions except virtual server recreation run in real time and are guaranteed to have completed successfully provided you receive an error-free message.
URL: https://ruvds.com/api/server/command/
Query Parameters:
sessionToken – token received after authentication
id – ID of server you want to make changes to
type – type of command:
start – start server
stop – server shutdown (emergency)
shutdown – shutdown
reset – reboot (emergency)
new_password – set new password for Administrator
recreate – recreate virtual server
remove – delete server
Request Example:
https://ruvds.com/api/server/command/?sessionToken=YOURTOKEN&id=38420&&type=start
Response Example:
{
"rejectReason": 0
}
Response Fields:
rejectReason – numeric value (error code)
errMessage – error description, if occured
Error Codes:
0 – request successfully completed
1 – invalid authentication token
2 – authentication token not specified
4 – virtual server not found by ID or incorrect command
6 – server has not been created yet or is blocked
7 – launch the server to execute the command
8 – reconfiguration ongoing
10 – current billing period will expire in less than 30 minutes, reconfiguration is not possible
11 – current billing period has expired
12 – reconfiguration is not available for this server
13 – you’ve reached the daily limit of reconfigurations for this server
14 – you’ve reached the monthly limit of reconfigurations for this server
100 – internal system error

 
We use cookies (our own) to make our websites easier for you to use. By continuing to use our website, you consent to the use of cookies. Please see our Privacy Policy for more information on cookies and information on how you can change your browser's cookie settings.