VDSina Public API

General information
Getting and using a token
Description of parameters and returned errors
List of available actions
Account information and shutdown forecast, GET /v1/account
Account balance, GET /v1/account.balance
Account limits, GET /v1/account.limit
Registration of a new account, POST /v1/register
List of tariff plan groups, GET /v1/server-group
List of data centers, GET /v1/datacenter
List of OS templates, GET /v1/template
List of tariff plans for servers, GET /v1/server-plan/ID
SSH keys for servers
ISO for servers
Servers
Server reboot, PUT /v1/server.reboot/ID
Reinstalling the server, PUT /v1/server.reinstall/ID
Setting the server password, PUT /v1/server.password/ID
Changing the server's tariff plan, PUT /v1/server.plan/ID
Server extension, PUT /v1/server.prolong/ID
VNC connection, GET /v1/server.vnc/ID
Server backup
Configuring Scheduled Server Backups
Connecting and disabling ISO for the server
Additional IP addresses for the server
Local IP address for the server
Server statistics, GET /v1/server.stat/ID
Operations on account balances
DNS Management

General information

Connection URL: https://userapi.vdsina.ru
The data format of the incoming request and the returned data: JSON.
Supported request methods: GET, POST, PUT, DELETE.
Standard usage: GET – to receive, POST – to create, PUT – to modify and DELETE – to delete an object.
Authorization: A token in the Authorization HTTP header.
All dates and timestamps are returned in the Europe/Moscow zone (the time zone in which the API server is located).
There are restrictions on the number of authentication requests from one IP address, with frequent unsuccessful authentication attempts, the IP address is blocked for 4 hours. The IP address is also checked against Spamhaus blacklists (SBL, SBL CSS, XBL, SBL DROP, TOR), authentication from such addresses is prohibited.

Getting and using a token

A permanent authorization token can be obtained in the personal account in viewing the user's account information:


The token changes when the user's password is changed.

To get an authorization token using the API, you need to authenticate, by sending a POST request to the /v1/auth location with a JSON object inside which there will be the email and password parameters are specified (the data of the user with whom you log in control panel), for example, so:

curl -X POST -H 'Content-Type: application/json' "https://userapi.vdsina.ru/v1/auth" -d '{"email": "admin@domain.ru", "password": "Pas$W0rD"}'

The result will return a JSON object with a new token:

{
    "status": "ok",
    "status_msg": "Token info",
    "data": {
      "token": "024ccf95e8544260c0f1f78a6da38d376d8636f6baa326c0da7b0a2c207693ad"
    }
}

After that, the received token can be used for any API requests, for example, to get an account balance:

curl -X GET -H 'Authorization: 024ccf95e8544260c0f1f78a6da38d376d8636f6baa326c0da7b0a2c207693ad' "https://userapi.vdsina.ru/v1/account.balance"

The result will return a JSON object with balance data:

{
    "status": "ok",
    "status_msg": "Balance information",
    "data": {
      "real": 2818,
      "bonus": 1240,
      "partner": 790
    }
}

The token will have the same access rights as the specified user on whose behalf the token request was made. If you need to restrict actions for API requests, you need to create a separate user in the account with the necessary set of rights and make requests with this user's token.

Description of parameters and returned errors

There is a return of standard HTTP statuses, both successful and erroneous, for example:

  • 200 – request completed without error,
  • 400 – the data was transmitted incorrectly or the request was formed incorrectly,
  • 401 – authentication required,
  • 403 – access denied,
  • 500 – internal server error and others.

As a result, a JSON object and some of its required fields should always be returned:

  • status – the status of the request execution, usually "ok" or "error",
  • status_msg – text transcript of error or success status, may be an empty string,
  • data – an object with the returned data.

As optional fields may be present:

  • status_code – numeric status of request execution, usually from the list of standard HTTP statuses,
  • description – a detailed description of the error that occurred, may be an empty string.

List of available actions

Account information and shutdown forecast, GET /v1/account

The ID and name of the account, the date of creation and the forecast of disconnection are returned (the date before which there are enough funds to pay for all services):

curl -X GET -H 'Authorization: 024ccf95e8544260c0f1f78a6da38d376d8636f6baa326c0da7b0a2c207693ad' "https://userapi.vdsina.ru/v1/account"

For example, a JSON object is returned as a result:

{
  "status": "ok",
  "status_msg": "Account information",
  "data": {
    "account": {
      "id": 7,
      "name": "a7"
    },
    "created": "2014-11-19 15:28:42",
    "forecast": "2020-08-12",
    "can": {
      "add_user": true,
      "add_service": true,
      "convert_to_cash": true
    }
  }
}

The data of the shutdown forecast and balance are cached and changed only in case of real changes in accounts or services. The can object will list some account features: the ability to create new users, order new services, withdraw money from accounts.

Account balance, GET /v1/account.balance

All available balances are returned, main, bonus and partner, if there were no transactions on the account, the balance is not returned:

curl -X GET -H 'Authorization: 024ccf95e8544260c0f1f78a6da38d376d8636f6baa326c0da7b0a2c207693ad' "https://userapi.vdsina.ru/v1/account.balance"
Account limits, GET /v1/account.limit

All available limits by service types are returned:

curl -X GET -H 'Authorization: 024ccf95e8544260c0f1f78a6da38d376d8636f6baa326c0da7b0a2c207693ad' "https://userapi.vdsina.ru/v1/account.limit"

For example, a JSON object is returned as a result:

{
  "status": "ok",
  "status_msg": "Account limits information",
  "data": {
    "server": {
      "max": 1,
      "now": 1
    },
    "server-ip4": {
      "max": 100,
      "child_max": 10,
      "now": 1
    },
    …
  }
}

For each type of service, an object will be returned that specifies the restrictions: max – the maximum of services of this type in the account, child_max – the maximum of services of this type in the parent service (for example, the number of IPv4 addresses for one server), now - the number of ordered services of this type in the account at the moment.

Registration of a new account, POST /v1/register

A new client account and a user with access to the control panel are created. Request example:

curl -X POST -H 'Authorization: 024ccf95e8544260c0f1f78a6da38d376d8636f6baa326c0da7b0a2c207693ad' -H 'Content-Type: application/json' "https://userapi.vdsina.ru/v1/register" -d '{"email": "admin@domain.ru", "code": "SuperPartner"}'

To register a new account, you must transfer the authorization token of an existing client. To register for the affiliate program, you must pass your affiliate code in the code field. The result of the request will be a similar object with data about the new account and user:

{
  "status": "ok",
  "status_msg": "New account created",
  "data": {
    "account": {
      "id": 190
    },
    "user": {
      "id": 347,
      "name": "admin@domain.ru",
      "token": "024ccf95e8544260c0f1f78a6deadbeefd8636f6baa326c0da7b0a2c207693ad"
    }
  }
}
List of tariff plan groups, GET /v1/server-group

A list of tariff plan groups with a brief description is returned, for example:

curl -X GET -H 'Authorization: 024ccf95e8544260c0f1f78a6da38d376d8636f6baa326c0da7b0a2c207693ad' "https://userapi.vdsina.ru/v1/server-group"

The received group IDs should be used in the future when requesting information on additional objects.

List of data centers, GET /v1/datacenter

A list of data centers is returned, for example:

curl -X GET -H 'Authorization: 024ccf95e8544260c0f1f78a6da38d376d8636f6baa326c0da7b0a2c207693ad' "https://userapi.vdsina.ru/v1/datacenter"

For example, a JSON object is returned as a result:

{
  "status": "ok",
  "status_msg": "Datacenters list",
  "data": [
    {
      "id": 1,
      "name": "Дата-центр RU",
      "country": "ru",
      "active": true
    },
    {
      "id": 2,
      "name": "Дата-центр NL",
      "country": "nl",
      "active": false
    }
  ]
}

The data is an array of objects, the active flag indicates the possibility of ordering a server in a specific data center.

List of OS templates, GET /v1/template

A list of operating system templates available for installing or reinstalling the server, for example:

curl -X GET -H 'Authorization: 024ccf95e8544260c0f1f78a6da38d376d8636f6baa326c0da7b0a2c207693ad' "https://userapi.vdsina.ru/v1/template"

For example, a JSON object is returned as a result:

{
  "status": "ok",
  "status_msg": "OS templates list",
  "data": [
    {
      "id": 1,
      "name": "CentOS 7 x64",
      "image": "http://api2.vdsina.ru/uploads/template/43a7db318bd2ea21eacabe44abf62fff.png",
      "active": true,
      "has_instruction": false,
      "ssh-key": true,
      "server-plan": [
        1,
        2
      ],
      "limits": {
        "cpu": {
          "min": 1
        },
        "ram": {
          "min": 1
        },
        "disk": {
          "min": 5
        }
      }
    },
    {
      "id": 2,
      "name": "Windows Server 2019",
      "image": "http://api2.vdsina.ru/uploads/template/2c96181313b73d1ee22075fc41c05fef.png",
      "active": true,
      "has_instruction": false,
      "ssh-key": false,
      "server-plan": [
        2,
        3
      ],
      "limits": {
        "cpu": {
          "min": 2
        },
        "ram": {
          "min": 4
        },
        "disk": {
          "min": 20
        }
      }
    }
  ]
}

The data is an array of objects, the active flag indicates the possibility of ordering a server with a specific OS template. The ssh-key flag indicates the ability to use authorization using a custom SSH key in a specific template. The server-plan array contains the ID of tariff plans for which the installation of a server with a specific OS template is available.

It is also necessary to pay attention to the minimum system requirements of the OS template: the following are specified in the limits object parameters: minimum number of processors/cores – cpu, minimum number RAM in GB is ram, the minimum amount of space for a disk partition in GB is disk.

List of tariff plans for servers, GET /v1/server-plan/ID

The list of tariff plans for servers is returned by the ID of the tariff plan group, for example:

curl -X GET -H 'Authorization: 024ccf95e8544260c0f1f78a6da38d376d8636f6baa326c0da7b0a2c207693ad' "https://userapi.vdsina.ru/v1/server-plan/1"

For example, a JSON object is returned as a result:

{
  "status": "ok",
  "status_msg": "Server plans list",
  "data": [
    {
      "id": 2,
      "name": "Plan-2",
      "cost": 20,
      "period": "day",
      "period_name": "день",
      "min_money": 100,
      "can_bonus": true,
      "description": "Test Plan",
      "data": {
        "cpu": {
          "type": "integer",
          "title": "vCPU",
          "value": 1,
          "for": "core"
        },
        "ram": {
          "type": "float",
          "title": "RAM",
          "value": 1,
          "bytes": 1073741824,
          "for": "ГБ"
        },
        "disk": {
          "type": "integer",
          "title": "NVMe",
          "value": 30,
          "bytes": 32212254720,
          "for": "ГБ"
        },
        "traff": {
          "type": "float",
          "title": "Трафик",
          "value": 32,
          "bytes": 35184372088832,
          "for": "ТБ"
        }
      },
      "server-group": 1,
      "selected": false,
      "active": true,
      "enable": true,
      "has_params": false,
      "backup": {
        "cost": 0.1,
        "full_cost": 0.1,
        "period": "day",
        "period_name": "день",
        "for": "ГБ"
      }
    },
    {
      "id": 4,
      "name": "Plan-4",
      "cost": 30,
      "period": "day",
      "period_name": "день",
      "min_money": 1000,
      "can_bonus": true,
      "description": "TEST",
      "data": {
        "cpu": {
          "type": "integer",
          "title": "vCPU",
          "value": 2,
          "for": "core"
        },
        "ram": {
          "type": "float",
          "title": "RAM",
          "value": 1,
          "bytes": 1073741824,
          "for": "ГБ"
        },
        "disk": {
          "type": "integer",
          "title": "NVMe",
          "value": 30,
          "bytes": 32212254720,
          "for": "ГБ"
        },
        "traff": {
          "type": "float",
          "title": "Трафик",
          "value": 32,
          "bytes": 35184372088832,
          "for": "ТБ"
        }
      },
      "server-group": 1,
      "selected": true,
      "active": false,
      "enable": false,
      "has_params": false,
      "backup": {
        "cost": 0.1,
        "full_cost": 0.1,
        "period": "day",
        "period_name": "день",
        "for": "ГБ"
      }
    }
  ]
}

The data is an array of objects, the active and enable flags indicate the possibility of ordering a server with a specific tariff plan. The data object contains brief characteristics of the tariff plan. The cost and period fields contain the price of the tariff for the specified period (usually 1 day). The min_money field indicates how much funds you need to have on the main balance to order the tariff, the can_bonus flag indicates the ability to pay the tariff with funds from the bonus balance.

The data object stores the full composition of the tariff plan: cpu – the number of processors/ cores, ram – the amount of RAM in GB, disk – the number of disk space in GB, traff – the amount of traffic included in the tariff plan for 1 calendar month in GB.

The has_params parameter stores the attribute of the constructor tariff, in this case additionally, the tariff may have a params object with data on the possible composition the final tariff and the cost of individual parameters of the tariff plan. Total cost such a tariff consists of the cost of the tariff plan itself and the total the cost of all added tariff parameters.

SSH keys for servers

Available methods:

  • GET /v1/ssh-key – list of all SSH keys available to the client
  • GET /v1/ssh-key/ID – view SSH-key data, key ID
  • PUT /v1/ssh-key/ID – edit data, key ID, available fields: name, data
  • POST /v1/ssh-key – creating a new key, available fields: name, data
  • DELETE /v1/ssh-key/ID – delete SSH-key, key ID
Field Sign Description, type
namenecessarilyString, key name
datanecessarilyString, text representation of the key (base64 encoding)
ISO for servers

Available methods:

  • GET /v1/iso – list of all ISO images uploaded by the client
  • GET /v1/iso/ID – view ISO data, ISO service ID
  • GET /v1/iso/KEY – view the ISO download status with the KEY key
  • POST /v1/iso – start of uploading a new ISO file, available fields: url
  • POST /v1/iso/KEY – creating a new ISO with the key of the downloaded KEY file
  • DELETE /v1/iso/ID – delete ISO, ISO service ID
Field Sign Description, type
urlnecessarilyString, URL for downloading the image file, direct link to the application/x-iso9660-image or application/x-iso-image MIME format file, maximum file size is 8 gigabytes, protocols: http, https, ftp, ftps

Possible ISO statuses:

  • new – ISO ordered, but not yet created
  • active – ISO is active and running
  • block – ISO is blocked by the administration
  • notpaid – ISO is blocked for non-payment
  • deleted – the ISO has been deleted

In addition to the ISO status, there may be an additional status in the status_text field. It contains a description of the action that is being performed with ISO at the moment.

The process of downloading a new file and creating an ISO service:

  • we pass to POST /v1/iso a new URL for uploading in the available url field, as a result, in the data object in the id field we get the upload ID KEY, or erroneous statuses indicating the error text
  • we make a periodic request to GET /v1/iso/KEY with the download ID KEY, checking whether the file has loaded: in the data object, we check the status field for the value "done", this means that the file has been downloaded, or the value "processing" is returned indicating the download progress, or erroneous statuses indicating the error text
  • creating an ISO service from the uploaded POST /v1/iso/KEY file with the KEY upload ID, as a result, in the data object in the id field we get the ISO service ID
Servers

Available methods:

  • GET /v1/server – a list of all the client's servers, in case there is not enough data about the server in the list, it is necessary to get data about a particular server by a separate request by its ID
  • GET /v1/server/ID – view the server and its parameters, ID of the server service
  • PUT /v1/server/ID – edit data, server service ID, available fields: name, autoprolong
  • POST /v1/server – creating a new server, available fields: datacenter, server-plan, template, ssh-key, iso, backup, host, name, cpu, ram, disk, ip4
  • DELETE /v1/server/ID – deleting the server with all its data and dependent services, ID of the server service
Field Sign Description, type
nameoptionalString, text name of the service for the convenience of the client
autoprolongoptional0 or 1, a sign of automatic renewal of the service
datacenternecessarilyThe number, ID of the data center, may not be available for ordering if there are no resources
server-plannecessarilyThe number, the ID of the tariff plan, must be from the desired group
templateoptionalNumber, OS template ID for installation, mutually exclusive parameter c backup, OS template may not be available for specific tariff plans
ssh-keyoptionalThe number, the SSH key ID for the root user in the supported OS, is ignored in case of recovery from a backup
backupoptionalThe number, ID of the backup service from which you need to restore after creating the server service, the mutually exclusive parameter c template, the backup copy must be located in the same data center as the server being created and be no larger than the disk size of the selected tariff plan
isooptionalThe number, the ID of the ISO service from which to install after creating the server service, the mutually exclusive parameter c template
hostoptionalThe string, the text value for the server hostname, must be the correct domain name, is ignored in case of recovery from a backup
cpuoptionalNumber, the number of virtual processors for the server being created, if the tariff plan supports parameter setting
ramoptionalNumber, the number of GB of RAM for the server being created, if the tariff plan supports parameter setting
diskoptionalNumber, the number of GB for the disk partition for the server being created, if the tariff plan supports parameter settings
ip4optional0 or 1, a sign of connecting an IPv4 address when creating a server, if the tariff plan supports parameter settings

When creating a server, it is necessary to take into account the minimum system requirements the OS template to install on the server, comparing the parameters from the tariff with the minimum parameters of the OS template.

Example of getting information about the server:

curl -X GET -H 'Authorization: 024ccf95e8544260c0f1f78a6da38d376d8636f6baa326c0da7b0a2c207693ad' "https://userapi.vdsina.ru/v1/server/1345"

And an example of the returned response in JSON format:

{
  "status": "ok",
  "status_msg": "Server information",
  "data": {
    "id": 1345,
    "name": "v1301.hosted-by-vdsina.ru",
    "status": "active",
    "created": "2019-07-11 20:05:49",
    "updated": "2019-07-12 17:50:02",
    "end": "2019-07-12 20:08:27",
    "autoprolong": true,
    "ip": [
      {
        "id": 1574,
        "ip": "185.251.37.62",
        "type": "4",
        "host": "host-185-251-37-62.hosted-by-vdsina.ru",
        "gateway": "185.251.37.1",
        "netmask": "255.255.255.0",
        "mac": "52:54:00:00:05:41"
      }
    ],
    "ip_local": null,
    "host": "v1301.hosted-by-vdsina.ru",
    "data": {
      "cpu": {
        "type": "integer",
        "title": "vCPU",
        "value": 1,
        "for": "core",
        "total": 4
      },
      "ram": {
        "type": "float",
        "title": "RAM",
        "value": 1,
        "bytes": 1073741824,
        "for": "ГБ",
        "total": 8,
        "total_bytes": 8589934592
      },
      "disk": {
        "type": "integer",
        "title": "NVMe",
        "value": 1,
        "bytes": 1073741824,
        "for": "ГБ",
        "total": 10,
        "total_bytes": 10737418240
      },
      "traff": {
        "type": "float",
        "title": "Трафик",
        "value": 32,
        "bytes": 35184372088832,
        "for": "ТБ"
      }
    },
    "server-plan": {
      "id": 44,
      "name": "Минималь+"
    },
    "server-group": {
      "id": 5,
      "name": "VDS"
    },
    "template": {
      "id": 22,
      "name": "Ubuntu 16.04"
    },
    "datacenter": {
      "id": 29,
      "name": "Serverius",
      "country": "nl"
    },
    "ssh-key": null,
    "can": {
      "reboot": true,
      "update": true,
      "delete": true,
      "prolong": false,
      "backup": true,
      "ip_local": true
    },
    "bandwidth": {
      "current_month": "20987612334",
      "past_month": "0"
    }
  }
}

Possible server statuses:

  • new – server ordered, but not yet created
  • active – the server is active and running
  • the block server is blocked by the administration
  • notpaid – server stopped for non-payment
  • deleted – the server has been deleted

In addition to the server status, there may be an additional status in the status_text field. It contains a description of the action that is being performed with the server at the moment.

The data object for the server shows its full configuration according to the tariff and the content of the tariff: cpu – the number of processors / cores, ram – the amount of RAM memory in GB, disk – the amount of disk space in GB, traff – the amount of traffic included in the tariff plan for 1 calendar month in GB. In the value parameters and total are the values from the basic tariff plan and the total values, respectively, if the tariff plan has been configured with additional parameters.

Server reboot, PUT /v1/server.reboot/ID

Server restart by server service ID. Additionally, you can pass the type field, which can take the values soft or hard. When setting type=soft (by default), a reboot signal will be sent to the server. When installing type=hard, the operating system will be sent a shutdown signal, after a while the status of the server will be checked, if it is turned off, it will be started again, otherwise the server will be shut down forcibly (with possible data loss in the running system), and after that it will be started again.

Field Sign Description, type
typeoptionalString, soft or hard
Reinstalling the server, PUT /v1/server.reinstall/ID

Reinstalling the server with a new OS template by server service ID. Transmitted fields: template, ssh-key, host.

Field Sign Description, type
templateoptionalThe number, the OS template ID to install, the OS template may not be available for specific tariff plans
ssh-keyoptionalNumber, SSH key ID for root user in supported OS
hostoptionalThe string, the text value for the server hostname, must be the correct domain name
Setting the server password, PUT /v1/server.password/ID

Setting the server password by the server service ID. Additionally, you need to pass the password field with a new password. The server will be restarted, the VNC password and the root user password are set in supported Linux distributions. Attention, if you are using an OS installed from your ISO or Windows or FreeBSD OS is installed on the server, the OS administrator password will not be changed, in this case only the VNC password changes.

Field Sign Description, type
passwordnecessarilyString, new password
Changing the server's tariff plan, PUT /v1/server.plan/ID

Changing (expanding) the server's tariff plan by the server service ID. Changing the tariff plan to a junior one is technically impossible. Additionally, you need to pass the server-plan field with the numeric ID of the new tariff plan. The server will be restarted. After changing the tariff plan, resources will be added automatically, you need to manually expand the file system to the entire new disk partition using OS tools.

Field Sign Description, type
server-plannecessarilyThe number, the ID of the tariff plan, must be from the desired group
cpuoptionalNumber, the number of virtual processors for the server, if the tariff plan supports parameter setting
ramoptionalNumber, the number of GB of RAM for the server, if the tariff plan supports parameter setting
diskoptionalNumber, the number of GB for the disk partition for the server, if the tariff plan supports parameter setting
Server extension, PUT /v1/server.prolong/ID

Server renewal by Server service ID in case the server was not started after payment, for example, due to disabled auto-renewal. Additional fields are not passed.

VNC connection, GET /v1/server.vnc/ID

Getting VNC connection data for the server by service ID.
Example of getting information:

curl -X GET -H 'Authorization: 024ccf95e8544260c0f1f78a6da38d376d8636f6baa326c0da7b0a2c207693ad' "https://userapi.vdsina.ru/v1/server.vnc/1345"

And an example of the returned response in JSON format:

{
  "status": "ok",
  "status_msg": "Server VNC information",
  "data": {
    "host": "kvm9249.vdsina.ru",
    "port": 5907,
    "password": "XAqc18T8sv7J1keZ"
  }
}
Server backup

Available methods:

  • GET /v1/backup – list of all services with backups
  • GET /v1/backup/ID – detailed information of the backup service, backup service ID
  • POST /v1/backup/ID – creating a new backup copy of the server, ID of the server service, without additional fields
  • PUT /v1/backup/ID – edit server backup service data, backup service ID, fields available: name, autoprolong
  • DELETE /v1/backup/ID – delete backup service with all data, backup service ID
  • PUT /v1/server.backup/ID – restore a backup copy to the server, server service ID, required field: backup
  • POST /v1/server.backup/ID – creating a new backup copy of the server, ID of the server service, without additional fields
  • PUT /v1/backup.copy/ID – copy a backup copy to another data center, backup service ID, required field: datacenter
Field Sign Description, type
nameoptionalString, text name of the service for the convenience of the client
autoprolongoptional0 or 1, a sign of automatic renewal of the service
backupnecessarilyThe number, ID of the backup service from which the server service needs to be restored, the backup copy must be located in the same data center as the server and be no larger than the disk size of the selected tariff plan
datacenternecessarilyThe number, ID of the data center to which you want to copy the backup service

Possible backup statuses:

  • new – backup has been ordered, but not yet created.
  • active – the backup is active
  • block – the backup copy is blocked by the administration
  • notpaid – the backup is blocked for non-payment
  • deleted – the backup has been deleted

In addition to the backup status, there may be an additional status in the status_text field. It contains a description of the action that is being performed with the backup at the moment.

Configuring Scheduled Server Backups

Available methods:

  • GET /v1/server.schedule/ID – list of schedules, ID of the server service
  • POST /v1/server.schedule/ID – creating a schedule, ID of the server service, fields available: type, day, hour, left
  • DELETE /v1/server.schedule/ID – deleting the schedule, ID of the server service, the field is available: type, if you do not specify the type of schedule, all schedules will be deleted
Field Sign Description, type
typenecessarilyString, schedule type, options: day, week, month, no more than one schedule of each type can be created for one server
dayoptionalThe date, the day of the backup (the day of the month (1-30), in the case of a monthly copy, or the number of the day of the week (1-7) in the case of a weekly copy), the field is not applicable to the daily backup
houroptionalDate, hour of backup creation (night hours only: 1-6)
leftoptionalNumber, number of copies to be saved (1-4)
Connecting and disabling ISO for the server

Available methods:

  • PUT /v1/server.iso/ID – ISO connection for the server, server service ID, required field: iso
  • DELETE /v1/server.iso/ID – disable ISO for server, server service ID, without additional fields
Field Sign Description, type
isonecessarilyNumber, ID of the service with ISO to connect
Additional IP addresses for the server

Available methods:

  • GET /v1/server-ip – list of all services with additional IP for servers
  • POST /v1/server-ip/ID – order additional IP for the server, server service ID, required fields: type, count
  • PUT /v1/server-ip/ID – deleting additional IP addresses for the server by the list, additional IP service ID, additional fields: type, delete
  • DELETE /v1/server-ip/ID – delete service with additional IP for server, service ID of additional IP
  • GET /v1/server.ip/ID – list of services with additional IP for the server, ID of the server service
  • POST /v1/server.ip/ID – order additional IP for the server, server service ID, required fields: type, count
  • PUT /v1/server.ip/ID – deleting additional IP addresses for the server by the list, server service ID, additional fields: type, delete
  • GET/v1/ip – list of all IP addresses assigned to the client (IP pool)
  • GET /v1/ip/ID – detailed information about the address in the IP pool, address ID
Field Sign Description, type
typeoptionalNumber, 4 or 6, IP address type, default 4
countnecessarilyThe number, the number of created IP addresses, account limits are taken into account (account.limit), greater than zero
deletenecessarilyList of numbers, list of IP address IDs to delete

Possible service statuses with additional IP:

  • new – service with IP ordered, but not yet created
  • active – the additional IP is active and working
  • block – additional IP is disabled and blocked by the administration
  • notpaid – additional IP is disabled for non-payment
  • deleted – the service with an additional IP has been deleted

In addition to the service status with additional IP, there may be an additional status in the status_text field. It contains a description of the action that is being performed with the service at the moment.

Local IP address for the server

Available methods:

  • GET /v1/server.ip.local/ID – information about the local IP for the server, the ID of the server service
  • POST /v1/server.ip.local/ID – creating a local IP for the server, ID of the server service
  • DELETE /v1/server.ip.local/ID – delete the local IP address for the server, the ID of the server service
Server statistics, GET /v1/server.stat/ID

Getting statistics data for the server by service ID. By default, information for the last 30 days is displayed. When specifying the from and to parameters, you can get statistics output for the specified period, it is permissible to specify the date/time in standard formats in the parameters. Example of getting information:

curl -X GET -H 'Authorization: 024ccf95e8544260c0f1f78a6da38d376d8636f6baa326c0da7b0a2c207693ad' "https://userapi.vdsina.ru/v1/server.stat/1345"

And an example of the returned response in JSON format:

{
  "status": "ok",
  "status_msg": "Server stat information",
  "data": [
    {
      "dt": "2019-07-12 00:00:00",
      "stat": {
        "cpu": 2.0839426931666667,
        "disk_reads": 1,
        "disk_writes": 11,
        "lnet_rx": 0,
        "lnet_tx": 0,
        "vnet_rx": 9948,
        "vnet_tx": 103054
      }
    },
    ...
  ]
}

Statistics are displayed in blocks every hour. The values can be decoded: cpu – average CPU utilization as a percentage per time segment, disk_reads/disk_writes – the number of read/write operations for the specified time segment, lnet_rx/lnet_tx – received and transmitted traffic over the LAN in bytes per time segment, vnet_rx/vnet_tx – received and transmitted traffic on the external network (Internet) in bytes.

Operations on account balances

Available methods:

  • GET /v1/operation – list of all operations of all types, available fields: from, to
  • GET /v1/operation/ID – detailed information about the operation, operation ID
  • POST /v1/operation – creating a new account balance replenishment operation, available fields: sum
  • DELETE /v1/operation/ID – delete an unpaid replenishment operation, operation ID
Field Sign Description, type
fromoptionalString, the date from which to get the list of operations
tooptionalThe string on which to get the list of operations
summoptionalNumber, amount of replenishment

Example of getting information:

curl -X GET -H 'Authorization: 024ccf95e8544260c0f1f78a6da38d376d8636f6baa326c0da7b0a2c207693ad' "https://userapi.vdsina.ru/v1/operation?from=2019-07-17&to=2019-07-19"

And an example of the returned response in JSON format:

{
  "status": "ok",
  "status_msg": "Operation list",
  "data": [
    {
      "id": 2177311,
      "purse": "real",
      "type": 1,
      "status": 0,
      "summ": "1000",
      "created": "2019-07-18 14:39:29",
      "updated": "2019-07-18 14:48:28",
      "comment": "Пополнение баланса",
      "payment": {
        "type": "webmoney",
        "name": "WebMoney R"
      },
      "service": null,
      "paylink": "https://cp.vdsina.ru/operation/select/41cd63800a8beb1961527ddeebf530a521391f"
    },
    {
      "id": 2170929,
      "purse": "real",
      "type": -1,
      "status": 1,
      "summ": "8.3",
      "created": "2019-07-17 14:24:25",
      "updated": "2019-07-17 14:24:25",
      "comment": "Списание за услугу Сервер 1 ГБ #137841 – api test server",
      "payment": null,
      "service": {
        "id": 137841
      },
      "paylink": null
    },
    ...
  ]
}

A brief description of some of the returned fields:
purse – balance type (real – main balance, bonus – bonus balance, partner – partner balance), type – operation type (1 – crediting, -1 – debiting), status – operation status (0 – not paid, 1 – paid), sum – operation amount (reduced to string type). If this is a replenishment operation and it can be paid for, such an operation has a paylink field, it contains a link to the payment process, the process does not require authentication in the control panel and the link can be transferred to anyone, the link is unique and one-time, if the operation is paid, it is impossible to pay again using such a link.

DNS Management

Available methods:

  • GET /v1/dns – list of all services with domains hosted in DNS
  • GET /v1/dns/ID – detailed information of a service with a domain in DNS, ID of a service with a domain
  • POST /v1/dns – creating a new domain in DNS, available fields: name, ip
  • DELETE /v1/dns/ID – delete the domain service in DNS, the service ID with the domain
  • GET /v1/dns.record/ID – list of DNS records for a service with a domain, ID of a service with a domain
  • POST /v1/dns.record/ID – creating a new DNS record, service ID with domain, available fields: host, type, priority, tag, value
  • PUT /v1/dns.record/ID – edit an existing DNS record, DNS record ID, available fields: priority, tag, value
  • DELETE /v1/dns.record/ID – delete an existing DNS record, DNS record ID
Field Sign Description, type
namenecessarilyString, domain name to be placed in DNS
ipoptionalString, IPv4 address to be used to create default DNS records
hostnecessarilyA string, the name of a DNS record, either with a domain postfix, or only a prefix, @ and * are also available in the name, must be the correct domain name in the end
typenecessarilyString, record type, one of the list: A, AAAA, CNAME, MX, NS, SRV, CAA, TXT
valuenecessarilyString, the value of the DNS record, depending on the type of different checks, for example, for a record of type A, the value must be the correct IPv4 address
tagoptionalThe string required parameter for CAA type records can be one of the following: issue, issuewild, iodef, unknown
priorityoptionalPositive number, priority/flag of DNS records for supported types (MX, SRV, CAA)

Possible DNS domain statuses:

  • new – DNS domain ordered, but not yet created
  • active – DNS domain is active and running
  • block – DNS domain is blocked by the administration
  • notpaid – DNS domain is blocked for non-payment
  • deleted – the DNS domain has been deleted

In addition to the DNS domain status, there may be an additional status in the status_text field. It contains a description of the action that is being performed with the DNS domain at the moment.

Close the window
Authentication
2FA verification
Close the window
Registration
A password will be sent to the specified email address
By clicking the "Continue" button, you agree to personal data processing policy and conditions of public offer
Close the window
Password Reminder
Close the window
Password Reminder
Close the window
Remind password
Exit