### Start Server - Vscale API v1 Source: https://developers.vds.selectel.ru/documentation/api/v1 Starts a previously stopped server. The response reflects the server's state before the start process begins. Requires server ID and API token. ```bash curl 'https://api.vscale.io/v1/scalets/:ctid/start' -X PATCH -H 'X-Token: 5c21a467f3b37c331e7482599f1e0971c9bedc30258d6977bbd1db2401bb27e8' --data-binary '{"id":10299}' -H 'Content-Type: application/json;charset=UTF-8' ``` -------------------------------- ### POST /scalets/:ctid/start Source: https://developers.vds.selectel.ru/documentation/api/v1 Starts a previously stopped server. Returns the current state of the server before the start process begins. ```APIDOC ## POST /scalets/:ctid/start ### Description Starts a previously stopped server. Returns the current state of the server before the start process begins. ### Method PATCH ### Endpoint /v1/scalets/:ctid/start ### Parameters #### Path Parameters - **ctid** (integer) - Required - The ID of the server to start. #### Request Body - **id** (integer) - Required - The ID of the server to start. ### Request Example ```json { "id": 10299 } ``` ### Response #### Success Response (200) - **location** (string) - The server's location. - **keys** (array) - List of SSH keys associated with the server. - **created** (string) - The creation timestamp of the server. - **hostname** (string) - The server's hostname. - **ctid** (integer) - The server ID. - **status** (string) - The current status of the server. - **deleted** (null) - Indicates if the server was deleted. - **rplan** (string) - The server's resource plan. - **name** (string) - The server's name. - **made_from** (string) - The image the server was created from. - **active** (boolean) - Indicates if the server is active. - **locked** (boolean) - Indicates if the server is locked. - **public_address** (object) - Public network details. - **private_address** (object) - Private network details. #### Response Example ```json { "location": "spb0", "keys": [ { "name": "key", "id": 72 } ], "created": "27.08.2015 14:22:39", "hostname": "cs12669.vscale.io", "ctid": 10299, "status": "stopped", "deleted": null, "rplan": "medium", "name": "Icy-Compass", "made_from": "ubuntu_14.04_64_002_master", "active": true, "locked": false, "public_address": { "gateway": "95.213.199.1", "address": "95.213.199.48", "netmask": "255.255.255.0" }, "private_address": {} } ``` ``` -------------------------------- ### Get List of Servers (curl) Source: https://developers.vds.selectel.ru/documentation/api/v1 An example of fetching the list of servers using curl. It shows the correct API endpoint and the mandatory 'X-Token' header. ```bash curl 'https://api.vscale.io/v1/scalets' -H 'X-Token: 5c21a467f3b37c331e7482599f1e0971c9bedc30258d6977bbd1db2401bb27e8' ``` -------------------------------- ### Get Account Information (curl) Source: https://developers.vds.selectel.ru/documentation/api/v1 Example of how to fetch account information using curl. It demonstrates the necessary endpoint and the required 'X-Token' header for authentication. ```bash curl 'https://api.vscale.io/v1/account' -H 'X-Token: 5c21a467f3b37c331e7482599f1e0971c9bedc30258d6977bbd1db2401bb27e8' ``` -------------------------------- ### GET /v1/backups Source: https://developers.vds.selectel.ru/documentation/api/v1 Lists all available system backups. ```APIDOC ## GET /v1/backups ### Description Retrieves a list of all backups associated with the account. ### Method GET ### Endpoint https://api.vscale.io/v1/backups ### Response #### Success Response (200) - **Array** (Object) - List of backup objects #### Response Example [ { "id": "b8895839-52d3-40e1-8c86-20463f38fec4", "name": "Trendy-Slowpoke_backup_20160823", "status": "finished", "size": 30 } ] ``` -------------------------------- ### GET /v1/domains/tags/ Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves a list of all user-created tags. ```APIDOC ## GET /v1/domains/tags/ ### Description Retrieves a list of all user-created tags. ### Method GET ### Endpoint https://api.vscale.io/v1/domains/tags/ ### Response #### Success Response (200) - **id** (array) - ID of the tag - **name** (String) - Name of the tag - **domains** (array) - List of domains with the tag #### Response Example ```json [ { "name" : "first_group", "id" : 1, "domains" : [ 50 ] }, { "name" : "second_group", "id" : 2, "domains" : [ 50 ] } ] ``` ``` -------------------------------- ### Reinstall OS (cURL) Source: https://developers.vds.selectel.ru/documentation/api/v1 Example of reinstalling the operating system on a server using cURL. This process reverts the OS to its initial state and deletes all data. It requires the server's `ctid`, an API token, and a new root password provided in the request body. ```bash curl 'https://api.vscale.io/v1/scalets/1550/rebuild' -X PATCH --data '{"password":"3edpd412ds"}' -H 'X-Token: 5c21a467f3b37c331e7482599f1e0971c9bedc30258d6977bbd1db2401bb27e8' -H 'Content-Type: application/json;charset=UTF-8' ``` -------------------------------- ### Create Server (curl) Source: https://developers.vds.selectel.ru/documentation/api/v1 Example of creating a server using curl. This demonstrates a POST request to the '/scalets' endpoint with a JSON payload specifying the server's configuration and the required 'X-Token' header. ```bash curl -i -X POST 'https://api.vscale.io/v1/scalets' -H 'Content-Type: application/json;charset=UTF-8' -H 'X-Token: 5c21a467f3b37c331e7482599f1e0971c9bedc30258d6977bbd1db2401bb27e8' -d '{"make_from":"ubuntu_14.04_64_002_master","rplan":"medium","do_start":true,"name":"New-Test","keys":[16],"location":"spb0"}' ``` -------------------------------- ### Get Server Information (cURL) Source: https://developers.vds.selectel.ru/documentation/api/v1 Example using cURL to retrieve detailed information about a specific server using its `ctid`. Requires an API token for authentication. The response is a JSON array containing the server's current state and configuration. ```bash curl 'https://api.vscale.io/v1/scalets/10299' -H 'X-Token: 5c21a467f3b37c331e7482599f1e0971c9bedc30258d6977bbd1db2401bb27e8' ``` -------------------------------- ### GET /v1/rplans Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves a list of all available hardware configurations (rplans) and their technical specifications. ```APIDOC ## GET /v1/rplans ### Description Returns a list of available server configurations including CPU, RAM, disk, and location details. ### Method GET ### Endpoint https://api.vscale.io/v1/rplans ### Response #### Success Response (200) - **id** (String) - Configuration name - **cpus** (Number) - Number of CPU cores - **memory** (Number) - RAM in MB - **disk** (Number) - Disk size in MB - **addresses** (Number) - Number of IP addresses #### Response Example [ { "id": "small", "cpus": 1, "memory": 512, "disk": 20480 } ] ``` -------------------------------- ### GET /v1/scalets/tags Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves a list of all server tags. ```APIDOC ## GET /v1/scalets/tags ### Description Returns a list of all existing server tags. ### Method GET ### Endpoint https://api.vscale.io/v1/scalets/tags ### Response #### Success Response (200) - **Array** (Object) - List of tags #### Response Example [ {"name": "Linux", "scalets": [], "id": 20}, {"name": "NEW TAG", "scalets": [10093], "id": 29} ] ``` -------------------------------- ### GET /websites/developers_vds_selectel_ru_api_v1 Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves cost information for different server sizes, including hourly and monthly rates. ```APIDOC ## GET /websites/developers_vds_selectel_ru_api_v1 ### Description Retrieves cost information for different server sizes, including hourly and monthly rates. ### Method GET ### Endpoint /websites/developers_vds_selectel_ru_api_v1 ### Parameters #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **default** (object) - Default pricing information. - **backup** (Number) - Cost of backup per unit. - **huge** (object) - Pricing for 'huge' server size. - **hour** (Number) - Cost per hour in kopecks. - **month** (Number) - Cost per month in kopecks. - **large** (object) - Pricing for 'large' server size. - **hour** (Number) - Cost per hour in kopecks. - **month** (Number) - Cost per month in kopecks. - **medium** (object) - Pricing for 'medium' server size. - **hour** (Number) - Cost per hour in kopecks. - **month** (Number) - Cost per month in kopecks. - **monster** (object) - Pricing for 'monster' server size. - **hour** (Number) - Cost per hour in kopecks. - **month** (Number) - Cost per month in kopecks. - **small** (object) - Pricing for 'small' server size. - **hour** (Number) - Cost per hour in kopecks. - **month** (Number) - Cost per month in kopecks. - **period** (string) - The period for which the pricing is applicable (e.g., 'YYYY-MM-DD HH:MM:SS'). #### Response Example ```json { "default":{ "backup":1, "huge":{ "hour":238, "month":160000 }, "large":{ "hour":119, "month":80000 }, "medium":{ "hour":59, "month":40000 }, "monster":{ "hour":476, "month":320000 }, "small":{ "hour":29, "month":20000 } }, "period":"2015-07-23 17:00:00" } ``` ``` -------------------------------- ### GET /v1/billing/prices Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves pricing information for all available configurations, including hourly and monthly rates. ```APIDOC ## GET /v1/billing/prices ### Description Returns the billing information for each configuration, detailing the cost per hour and per month. ### Method GET ### Endpoint https://api.vscale.io/v1/billing/prices ### Response #### Success Response (200) - **prices** (Object) - Pricing details for configurations and traffic. ``` -------------------------------- ### GET /v1/images Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves a list of available server images, including the compatible hardware configurations for each image. ```APIDOC ## GET /v1/images ### Description Returns a list of available server images. Each image includes an 'id' (OS name) and 'rplans' (list of compatible configurations). ### Method GET ### Endpoint https://api.vscale.io/v1/images ### Response #### Success Response (200) - **id** (String) - OS image identifier - **rplans** (Array) - List of compatible configuration plans - **active** (Boolean) - Availability status - **size** (Number) - Image size in MB - **locations** (Array) - Available data centers #### Response Example [ { "rplans": ["small", "medium"], "active": true, "size": 2048, "id": "debian_8.1_64_001_master" } ] ``` -------------------------------- ### GET /v1/domains/ptr/ Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves a list of all existing PTR records for the authenticated user. ```APIDOC ## GET /v1/domains/ptr/ ### Description Returns a list of all available reverse DNS (PTR) records. ### Method GET ### Endpoint https://api.vscale.io/v1/domains/ptr/ ### Response #### Success Response (200) - **content** (string) - The domain name value of the PTR record. - **user_id** (integer) - The ID of the user who owns the record. - **ip** (string) - The IP address associated with the record. - **id** (integer) - The unique identifier of the PTR record. #### Response Example [ { "content" : "example.com", "user_id" : 4119, "ip" : "192.168.0.6", "id" : 96 } ] ``` -------------------------------- ### GET /v1/domains/ Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves a list of all domains associated with the account. Includes details such as domain name, creation date, and tags. ```APIDOC ## GET /v1/domains/ ### Description Retrieves a list of all domains associated with the account. Includes details such as domain name, creation date, and tags. ### Method GET ### Endpoint /v1/domains/ ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl 'https://api.vscale.io/v1/domains/' -H 'X-Token: YOUR_API_TOKEN' ``` ### Response #### Success Response (200) - **id** (Number) - The domain ID. - **name** (String) - The domain name. - **tags** (Array) - A list of tags associated with the domain. - **create_date** (Number) - The domain creation time in Unix timestamp format. - **change_date** (Number) - The time of the last record update in Unix timestamp format. - **user_id** (Number) - The user ID associated with the domain. #### Response Example ```json [ { "id": 11, "change_date": 1453224858, "create_date": 1453224858, "name": "example.net", "tags": [], "user_id": 4119 } ] ``` #### Error Response (403) - **forbidden** (String) - Indicates an invalid or non-existent token was provided. #### Error Response (404) - **path_not_found** (String) - Indicates that the specified path does not exist. ``` -------------------------------- ### GET /account Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves full information about the current account, including user details, account activation date, and email address. ```APIDOC ## GET /account ### Description Retrieves full information about the current account, including user details, account activation date, and email address. ### Method GET ### Endpoint /account ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl 'https://api.vscale.io/v1/account' -H 'X-Token: YOUR_API_TOKEN' ``` ### Response #### Success Response (200) - **actdate** (String) - Account activation date - **country** (String) - User-specified country - **face_id** (Number) - Service parameter indicating client type - **state** (Number) - Service parameter (1 - active, 0 - inactive) - **email** (String) - User-registered email address - **name** (String) - User's first name - **middlename** (String) - User's middle name - **surname** (String) - User's last name #### Response Example ```json { "info": { "actdate": "2015-07-07 08:16:47.107987", "country": "", "email": "username@domain.ru", "face_id": "1", "id": "1001", "locale": "ru", "middlename": "Userovich", "mobile": "+79901234567", "name": "Polzovatel", "state": "1", "surname": "Vskaletov" } } ``` #### Error Response (403) - **forbidden** (String) - Invalid or non-existent token provided ``` -------------------------------- ### GET /scalets/:ctid Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves detailed information about a specific virtual server. ```APIDOC ## GET /scalets/:ctid ### Description Returns information about a server in JSON format. ### Method GET ### Endpoint https://api.vscale.io/v1/scalets/:ctid ### Parameters #### Path Parameters - **ctid** (Integer) - Required - The unique identifier of the server ### Response #### Success Response (200) - **ctid** (Integer) - Server ID - **status** (String) - Current status - **name** (String) - Server name #### Response Example { "ctid": 10299, "status": "started", "name": "Hollow-Star" } ``` -------------------------------- ### Get Billing Payments API Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves information about recent fund top-ups to the account. Requires an API token for authentication. Returns a list of payment objects. ```bash curl 'https://api.vscale.io/v1/billing/payments/' -H 'X-Token: 5c21a467f3b37c331e7482599f1e0971c9bedc30258d6977bbd1db2401bb27e8' ``` ```http HTTP/1.1 200 OK { "items":[ { "created":1436874650, "desc":"\u041f\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0430", "dir":1, "id":20522, "is_bonus":0, "price":10000, "state":0, "type":170 }, { "created":1436509300, "desc":"\u041f\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0430", "dir":1, "id":20517, "is_bonus":0, "price":20000, "state":0, "type":170 }, { "created":1436246224, "desc":"\u041f\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0430", "dir":1, "id":20493, "is_bonus":0, "price":10000, "state":0, "type":170 } ], "status":"ok" } ``` -------------------------------- ### GET /scalets Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves a list of all servers associated with the account. Supports filtering by various server attributes. ```APIDOC ## GET /scalets ### Description Retrieves a list of all servers associated with the account. Supports filtering by various server attributes. ### Method GET ### Endpoint /scalets ### Parameters #### Query Parameters - **locked** (Boolean) - Filter by server lock status (true: locked, false: unlocked) - **location** (String) - Filter by data center location - **rplan** (String) - Filter by server plan - **active** (Boolean) - Filter by server active status (true: running, false: stopped) - **keys** (Array) - Filter by associated SSH keys - **status** (String) - Filter by server status (started, stopped, billing) - **made_from** (String) - Filter by operating system image #### Request Body None ### Request Example ```bash curl 'https://api.vscale.io/v1/scalets' -H 'X-Token: YOUR_API_TOKEN' ``` ### Response #### Success Response (200) - **hostname** (String) - Server hostname - **locked** (Boolean) - Server lock status - **location** (String) - Data center location - **rplan** (String) - Server plan - **name** (String) - Server name - **active** (Boolean) - Server active status - **keys** (Array) - List of SSH keys associated with the server - **public_address** (Object) - Public network address details - **status** (String) - Server status (started, stopped, billing) - **made_from** (String) - Operating system image - **ctid** (Number) - Server ID - **private_address** (Object) - Private network address details #### Response Example ```json [ { "hostname":"cs10087.vscale.ru", "locked":false, "location":"CiDK", "rplan":"monster", "name":"mytestserver", "active":true, "keys": [ { "name": "somekeyname", "id": 16 } ], "public_address":{ "netmask":"255.255.255.0", "gateway":"95.213.191.1", "address":"95.213.191.70" }, "status":"started", "made_from":"ubuntu_14.04_64_002_master", "ctid":10087, "private_address":{} } ] ``` #### Error Response (403) - **forbidden** (String) - Invalid or non-existent token provided #### Error Response (404) - **path_not_found** (String) - The specified path does not exist ``` -------------------------------- ### GET /v1/locations Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves a list of all available data-center locations, including supported templates and configurations. ```APIDOC ## GET /v1/locations ### Description Returns a list of data-centers with their available resources. ### Method GET ### Endpoint https://api.vscale.io/v1/locations ### Response #### Success Response (200) - **id** (string) - Location identifier - **templates** (array) - List of available OS templates - **rplans** (array) - List of available resource plans #### Response Example [ { "active": true, "id": "spb0", "templates": ["ubuntu_16.04_64_001_master"], "rplans": ["small", "medium"] } ] ``` -------------------------------- ### Get Account Information (API) Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves full information about the current account, including activation date, email, and personal details. Requires an API token for authentication. ```http GET https://api.vscale.io/v1/account ``` -------------------------------- ### Get List of Servers (API) Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves a list of all virtual servers associated with the account. This endpoint requires an API token for authentication. ```http GET https://api.vscale.io/v1/scalets ``` -------------------------------- ### List Backups Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves a list of all available backups. This endpoint is accessed via an HTTP GET request to '/v1/backups' and requires an 'X-Token' header for authentication. The response is a JSON array, where each object represents a backup with details like id, name, status, size, and creation date. ```bash $ curl 'https://api.vscale.io/v1/backups' -H 'X-Token: 5c21a467f3b37c331e7482599f1e0971c9bedc30258d6977bbd1db2401bb27e8' -H 'Content-Type: application/json;charset=UTF-8' ``` -------------------------------- ### GET /tasks Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves information about all currently executing operations. Note that API statuses may not update immediately after an operation (e.g., 'defined' instead of 'created'). ```APIDOC ## GET /tasks ### Description Retrieves information about all currently executing operations. Note that API statuses may not update immediately after an operation (e.g., 'defined' instead of 'created'). ### Method GET ### Endpoint /v1/tasks ### Parameters #### Query Parameters None ### Request Example ```bash curl -i https://api.vscale.io/v1/tasks -H ‘X-Token: YOUR_API_TOKEN' ``` ### Response #### Success Response (200) (Response structure not provided in the source text, but typically includes a list of tasks with their status, type, and associated resources.) #### Response Example (Example response not provided in the source text.) ``` -------------------------------- ### GET /v1/billing/consumption Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves information about account debits for a specified period. The period starts from the first date and excludes the last specified date. ```APIDOC ## GET /v1/billing/consumption ### Description Retrieves information about account debits for a specified period. The period starts from the first date and excludes the last specified date. ### Method GET ### Endpoint /v1/billing/consumption ### Parameters #### Query Parameters - **start** (String) - Required - The start date of the period (YYYY-MM-DD). - **end** (String) - Required - The end date of the period (YYYY-MM-DD). #### Request Body None ### Request Example ```bash curl 'https://api.vscale.io/v1/billing/consumption?start=2015-07-01&end=2015-08-01' -H 'X-Token: YOUR_API_TOKEN' ``` ### Response #### Success Response (200) - The response is a JSON object where keys are account IDs and values contain debit details. - **huge** (Object) - Details for 'huge' type debits. - **count** (Number) - Number of 'huge' debits. - **summ** (Number) - Sum of 'huge' debits. - **monster** (Object) - Details for 'monster' type debits. - **count** (Number) - Number of 'monster' debits. - **summ** (Number) - Sum of 'monster' debits. - **large** (Object) - Details for 'large' type debits. - **count** (Number) - Number of 'large' debits. - **summ** (Number) - Sum of 'large' debits. - **medium** (Object) - Details for 'medium' type debits. - **count** (Number) - Number of 'medium' debits. - **summ** (Number) - Sum of 'medium' debits. - **summ** (Number) - Total sum of debits for the account. #### Response Example ```json { "10087": { "huge": { "count": 70, "summ": 16660 }, "monster": { "count": 66, "summ": 31416 }, "summ": 48076 }, "10138": { "large": { "count": 64, "summ": 7616 }, "medium": { "count": 67, "summ": 3953 } } } ``` ``` -------------------------------- ### POST /v1/scalets/{scalet_id}/backup Source: https://developers.vds.selectel.ru/documentation/api/v1 Creates a backup of an existing virtual machine without requiring downtime. ```APIDOC ## POST /v1/scalets/{scalet_id}/backup ### Description Clones a virtual machine by creating a backup on the fly. ### Method POST ### Endpoint https://api.vscale.io/v1/scalets/{scalet_id}/backup ### Parameters #### Path Parameters - **scalet_id** (integer) - Required - The ID of the server to back up. #### Request Body - **name** (string) - Required - Name for the backup. ### Request Example { "name": "my_backup" } ### Response #### Success Response (200) - **id** (string) - Backup ID - **name** (string) - Backup name - **size** (integer) - Backup size in GB #### Response Example { "id": "b8895839-52d3-40e1-8c86-20463f38fec4", "name": "my_backup", "size": 30 } ``` -------------------------------- ### Get Billing Consumption API Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves information about fund consumption within a specified date range. The `start` date is inclusive, and the `end` date is exclusive. Requires an API token. Returns consumption data aggregated by resource ID. ```bash curl 'https://api.vscale.io/v1/billing/consumption?start=2015-07-01&end=2015-08-01' -H 'X-Token: 5c21a467f3b37c331e7482599f1e0971c9bedc30258d6977bbd1db2401bb27e8' ``` ```http HTTP/1.1 200 OK { "10087":{ "huge":{ "count":70, "summ":16660 }, "monster":{ "count":66, "summ":31416 }, "summ":48076 }, "10138":{ "large":{ "count":64, "summ":7616 }, "medium":{ "count":67, "summ":3953 } } } ``` -------------------------------- ### POST /v1/domains/ Source: https://developers.vds.selectel.ru/documentation/api/v1 Creates a new domain. You can optionally provide a BIND format zone file. ```APIDOC ## POST /v1/domains/ ### Description Creates a new domain. You can optionally provide a BIND format zone file. ### Method POST ### Endpoint /v1/domains/ ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **name** (String) - Required - The name of the domain. - **bind_zone** (String) - Optional - The zone file in BIND format. ### Request Example ```bash curl 'https://api.vscale.io/v1/domains/' -XPOST -d '{"name": "example.com"}' -H 'X-Token: YOUR_API_TOKEN' -H "Content-Type: application/json" ``` ### Response #### Success Response (200) - **id** (Number) - The ID of the newly created domain. - **name** (String) - The name of the created domain. - **tags** (Array) - An empty array, as tags are not set during creation. - **create_date** (Number) - The creation timestamp of the domain. - **change_date** (Number) - The timestamp of the last change to the domain. - **user_id** (Number) - The ID of the user who created the domain. #### Response Example ```json { "change_date": 1453996976, "create_date": 1453996976, "id": 36, "name": "example.com", "tags": [], "user_id": 4119 } ``` #### Error Response (403) - **forbidden** (String) - Indicates an invalid or non-existent token was provided. ``` -------------------------------- ### POST /scalets Source: https://developers.vds.selectel.ru/documentation/api/v1 Creates a new virtual server based on a specified image or backup. ```APIDOC ## POST /scalets ### Description Creates a new virtual server using a provided image or backup ID and configuration plan. ### Method POST ### Endpoint https://api.vscale.io/v1/scalets ### Parameters #### Request Body - **make_from** (String) - Required - Id of the image or backup to create the server from - **rplan** (String) - Required - Id of the tariff plan - **do_start** (Boolean) - Optional - Whether to start the server after creation (default: false) - **name** (String) - Required - Name of the server - **keys** (Array) - Optional - SSH keys - **password** (String) - Optional - Root password - **location** (String) - Required - Id of the data center ### Request Example { "make_from": "ubuntu_14.04_64_002_master", "rplan": "medium", "do_start": true, "name": "New-Test", "keys": [16], "location": "spb0" } ### Response #### Success Response (200) - **ctid** (Integer) - Server ID - **status** (String) - Current status #### Response Example { "status": "defined", "ctid": 11, "name": "New-Test" } ``` -------------------------------- ### Get Current Operations Status - Vscale API v1 Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves information about all currently executing operations. The API updates object statuses asynchronously; for example, a server creation might initially show 'defined' before changing to 'created'. Requires API token. ```bash curl -i https://api.vscale.io/v1/tasks -H ‘X-Token: 5c21a467f3b37c331e7482599f1e0971c9bedc30258d6977bbd1db2401bb27e8' ``` -------------------------------- ### Create Server (API) Source: https://developers.vds.selectel.ru/documentation/api/v1 Creates a new virtual server with specified characteristics. The request body should include parameters like OS image, plan, name, and optionally SSH keys and auto-start settings. Requires an API token. ```http POST https://api.vscale.io/v1/scalets ``` -------------------------------- ### Get Server Tags List Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves a list of all server tags. This operation is performed using an HTTP GET request to the '/v1/scalets/tags' endpoint, authenticated with an X-Token header. The response is a JSON array of tag objects, each containing 'name', 'scalets', and 'id'. ```bash $ curl 'https://api.vscale.io/v1/scalets/tags' -X GET -H 'X-Token: 5c21a467f3b37c331e7482599f1e0971c9bedc30258d6977bbd1db2401bb27e8' ``` -------------------------------- ### POST /v1/scalets/tags Source: https://developers.vds.selectel.ru/documentation/api/v1 Creates a new server tag. ```APIDOC ## POST /v1/scalets/tags ### Description Creates a new tag for server management. ### Method POST ### Endpoint https://api.vscale.io/v1/scalets/tags ### Parameters #### Request Body - **name** (String) - Required - Название тега - **scalets** (Array) - Optional - ID скалетов (массив int) ### Request Example { "name": "new_tag", "scalets": [42, 50] } ### Response #### Success Response (201) - **id** (int) - ID тега - **name** (String) - Название тега - **scalets** (Array) - Список ID скалетов #### Response Example { "id": 10, "name": "new_tag", "scalets": [42, 45] } ``` -------------------------------- ### Create Server Backup Source: https://developers.vds.selectel.ru/documentation/api/v1 Initiates an online backup of a virtual machine without requiring a shutdown. Returns the backup metadata including ID and creation timestamp. ```cURL curl 'https://api.vscale.io/v1/scalets/42590/backup' -X POST --data-binary '{"name":"my_backup"}' -H 'X-Token: 5c21a467f3b37c331e7482599f1e0971c9bedc30258d6977bbd1db2401bb27e8' -H 'Content-Type: application/json;charset=UTF-8' ``` -------------------------------- ### Get Server Tag Information Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves detailed information about a specific server tag identified by its ID. Uses an HTTP GET request to '/v1/scalets/tags/:tagid'. Requires an X-Token header for authentication. The response is a JSON object with tag details, or an error if the tag is not found. ```bash $ curl 'https://api.vscale.io/v1/scalets/tags/20' -X GET -H 'X-Token: 5c21a467f3b37c331e7482599f1e0971c9bedc30258d6977bbd1db2401bb27e8' ``` -------------------------------- ### Retrieve Available Server Images Source: https://developers.vds.selectel.ru/documentation/api/v1 Fetches a list of available operating system images and their compatible hardware plans. Requires an authentication token in the header. ```bash curl 'https://api.vscale.io/v1/images' -H 'X-Token: 5c21a467f3b37c331e7482599f1e0971c9bedc30258d6977bbd1db2401bb27e8' ``` -------------------------------- ### Create Server Request and Response (JSON) Source: https://developers.vds.selectel.ru/documentation/api/v1 Demonstrates the JSON payload for creating a new server and a successful response. This includes parameters like image ID, plan ID, server name, SSH keys, and location. The response confirms the server's status and details. ```json { "make_from":"ubuntu_14.04_64_002_master", "rplan":"medium", "do_start":true, "name":"New-Test", "keys":[16], "location":"spb0" } ``` ```json { "status": "defined", "deleted": null, "public_address": {}, "active": false, "location": "spb0", "locked": true, "hostname": "cs11533.vscale.io", "created": "20.08.2015 14:57:04", "keys": [ { "name": "somekeyname", "id": 16 } ], "private_address": {}, "made_from": "ubuntu_14.04_64_002_master", "name": "New-Test", "ctid": 11, "rplan": "medium" } ``` -------------------------------- ### GET /v1/domains/tags/:tag_id Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves information about a specific tag by its ID. ```APIDOC ## GET /v1/domains/tags/:tag_id ### Description Retrieves information about a specific tag by its ID. ### Method GET ### Endpoint https://api.vscale.io/v1/domains/tags/:tag_id ### Parameters #### Path Parameters - **tag_id** (Number) - Required - The ID of the tag to retrieve ### Response #### Success Response (200) - **name** (String) - Name of the tag - **domains** (array) - List of domains with the tag - **id** (Number) - ID of the tag #### Response Example ```json { "name" : "second_group", "domains" : [], "id" : 2 } ``` ``` -------------------------------- ### POST /scalets Source: https://developers.vds.selectel.ru/documentation/api/v1 Creates a new server with the specified characteristics. Returns information about the newly created server. ```APIDOC ## POST /scalets ### Description Creates a new server with the specified characteristics. Returns information about the newly created server. ### Method POST ### Endpoint /scalets ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **make_from** (String) - Required - Operating system image to use for the server - **rplan** (String) - Required - Server plan - **do_start** (Boolean) - Optional - Whether to start the server immediately after creation (defaults to true) - **name** (String) - Optional - Name for the server - **keys** (Array) - Optional - List of SSH key IDs to associate with the server - **location** (String) - Optional - Data center location for the server ### Request Example ```json { "make_from": "ubuntu_14.04_64_002_master", "rplan": "medium", "do_start": true, "name": "New-Test", "keys": [16], "location": "spb0" } ``` ### Response #### Success Response (200) - **hostname** (String) - Server hostname - **locked** (Boolean) - Server lock status - **location** (String) - Data center location - **rplan** (String) - Server plan - **name** (String) - Server name - **active** (Boolean) - Server active status - **keys** (Array) - List of SSH keys associated with the server - **public_address** (Object) - Public network address details - **status** (String) - Server status (started, stopped, billing) - **made_from** (String) - Operating system image - **ctid** (Number) - Server ID - **private_address** (Object) - Private network address details #### Response Example ```json { "hostname": "cs10300.vscale.ru", "locked": false, "location": "spb0", "rplan": "medium", "name": "New-Test", "active": true, "keys": [ { "name": "somekeyname", "id": 16 } ], "public_address": { "netmask": "255.255.255.0", "gateway": "95.213.191.1", "address": "95.213.191.122" }, "status": "started", "made_from": "ubuntu_14.04_64_002_master", "ctid": 10300, "private_address": {} } ``` #### Error Response (403) - **forbidden** (String) - Invalid or non-existent token provided ``` -------------------------------- ### Create Domain API Source: https://developers.vds.selectel.ru/documentation/api/v1 Creates a new domain for the account. Requires an API token and a JSON payload containing the domain name. Optionally, a BIND zone file can be provided. Returns the details of the newly created domain. ```bash curl 'https://api.vscale.io/v1/domains/' -XPOST -d '{"name": "example.com"}' -H 'X-Token: 5c21a467f3b37c331e7482599f1e0971c9bedc30258d6977bbd1db2401bb27e8' -H "Content-Type: application/json" ``` ```http HTTP/1.1 200 OK { "change_date" : 1453996976, "create_date" : 1453996976, "id" : 36, "name" : "example.com", "tags" : [], "user_id" : 4119 } ``` -------------------------------- ### GET /v1/scalets/tags/:tagid Source: https://developers.vds.selectel.ru/documentation/api/v1 Retrieves detailed information about a specific tag. ```APIDOC ## GET /v1/scalets/tags/:tagid ### Description Fetches details for a specific tag by its ID. ### Method GET ### Endpoint https://api.vscale.io/v1/scalets/tags/:tagid ### Parameters #### Path Parameters - **tagid** (int) - Required - ID тега ### Response #### Success Response (200) - **id** (int) - ID тега - **name** (String) - Название тега - **scalets** (Array) - Список ID скалетов #### Response Example { "scalets": [10093], "id": 20, "name": "Linux" } ```