### Asynchronous Operation Example Source: https://developers.cloudvps.reg.ru/getting-started/taskqueue.html An example of a response received after sending a request for an asynchronous operation, such as a server reboot. ```APIDOC ## Asynchronous Operation Example ### Description This example shows the response format for an asynchronous operation, like a server reboot, indicating the job has been queued. ### Response #### Success Response (200) - **action** (object) - Contains details about the asynchronous action. - **completed_at** (string) - The date and time the job was completed. - **created_at** (string) - The date and time the job was created. - **id** (integer) - The unique identifier for the job. - **region_slug** (string) - The region where the job was sent. - **resource_id** (integer) - The unique identifier of the resource associated with the job. - **resource_type** (string) - The type of the resource (e.g., 'reglet'). - **started_at** (string) - The date and time the background job started. - **status** (string) - The current status of the job (e.g., 'in-progress'). - **type** (string) - The type of the job (e.g., 'reboot'). ### Response Example ```json { "action": { "completed_at": "2018-07-12 01:31:44", "created_at": "2019-03-04 18:11:01", "id": 119123, "region_slug": "msk1", "resource_id": 6867, "resource_type": "reglet", "started_at": "2018-07-12 01:31:44", "status": "in-progress", "type": "reboot" } } ``` ``` -------------------------------- ### Get List of Additional IPs Source: https://developers.cloudvps.reg.ru/add-ip/list.html Use this GET request to retrieve a list of all ordered additional IP addresses. Ensure your authorization token is correctly set. ```bash curl \ -X GET \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ 'https://api.cloudvps.reg.ru/v1/ips' ``` -------------------------------- ### POST /v1/reglets/{server_id}/actions Source: https://developers.cloudvps.reg.ru/reglets/power_on_off.html This endpoint allows you to start or stop a virtual server by sending a POST request with the desired action in the request body. ```APIDOC ## POST /v1/reglets/{server_id}/actions ### Description Starts or stops a virtual server. ### Method POST ### Endpoint /v1/reglets//actions ### Parameters #### Path Parameters - **server_id** (integer) - Required - The unique identifier of the server. #### Request Body - **type** (string) - Required - The action to perform. Use 'start' to turn on the server or 'stop' to turn it off. ### Request Example ```json { "type": "start" } ``` ### Response #### Success Response (200) - **action** (object) - Information about the job for starting or stopping the server. - **completed_at** (string) - The timestamp when the action was completed. - **id** (integer) - The unique identifier of the action. - **region_slug** (string) - The slug of the region where the server is located. - **resource_id** (integer) - The ID of the resource (server) the action is associated with. - **resource_type** (string) - The type of the resource, typically 'reglet'. - **started_at** (string) - The timestamp when the action started. - **status** (string) - The current status of the action (e.g., 'in-progress'). - **type** (string) - The type of action performed (e.g., 'start'). #### Response Example ```json { "action": { "completed_at": "2018-07-12 01:31:44", "id": 119123, "region_slug": "msk1", "resource_id": 6867, "resource_type": "reglet", "started_at": "2018-07-12 01:31:44", "status": "in-progress", "type": "start" } } ``` ``` -------------------------------- ### GET /v2/plans Source: https://developers.cloudvps.reg.ru/sizes/index.html Retrieves a list of available hosting plans with pagination and filtering options. ```APIDOC ## GET /v2/plans ### Description Retrieves a list of available hosting plans. This endpoint supports pagination and filtering by region, plan line, disk size, memory, and vCPUs. ### Method GET ### Endpoint /v2/plans ### Parameters #### Query Parameters - **items_per_page** (integer) - Required - Number of items per page (1 to 100). - **page** (integer) - Required - Page number (minimum 1). - **region** (string) - Required - Region for hosting (e.g., `msk1`, `openstack-msk1`, `openstack-spb1`, `openstack-sam1`). - **plan_line** (string) - Optional - Identifier for the plan line (e.g., `base`, `hp`, `highcpu`, `ddc`, `gpu-hp`). - **disk** (integer) - Optional - Disk size in GB. - **memory** (integer) - Optional - Memory size in GB. - **vcpus** (integer) - Optional - Number of virtual CPUs. - **unit** (string) - Optional - Billing unit (e.g., `hour`). ### Request Example ```bash curl \ -X GET \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ 'https://api.cloudvps.reg.ru/v2/plans?region=openstack-msk1&page=1&items_per_page=10' ``` ### Response #### Success Response (200) - **metadata** (object) - Contains pagination information. - **pages** (object) - Pagination details. - **current** (integer) - Current page number. - **items_per_page** (integer) - Number of items displayed per page. - **total** (integer) - Total number of pages. - **total** (integer) - Total number of items returned. - **plans** (array) - An array of plan objects. - **disk** (integer) - Disk size in GB. - **id** (integer) - Unique identifier for the plan. - **memory** (integer) - Memory size in GB. - **name** (string) - Name of the plan. - **plan_line** (string) - Identifier for the plan line. - **price_per_hour** (string) - Price per hour. - **price_per_month** (integer) - Price per month. - **slug** (string) - Unique, human-readable identifier for the plan. - **unit** (string) - Billing unit type. - **vcpus** (integer) - Number of virtual CPUs. - **videocards** (integer) - Number of video cards. #### Response Example ```json { "metadata": { "pages": { "current": 1, "items_per_page": 100, "total": 1 }, "total": 100 }, "plans": [ { "disk": 10, "id": 10451, "memory": 1024, "name": "HP C1-M1-D10", "plan_line": "hp", "price_per_hour": "0.71", "price_per_month": 480, "slug": "c1-m1-d10-hp", "unit": "hour", "vcpus": 1, "videocards": 0 }, { "disk": 40, "id": 10651, "memory": 2048, "name": "HP C2-M2-D40", "plan_line": "hp", "price_per_hour": "1.79", "price_per_month": 1200, "slug": "c2-m2-d40-hp", "unit": "hour", "vcpus": 2, "videocards": 0 } ] } ``` ``` -------------------------------- ### GET Request to List Images Source: https://developers.cloudvps.reg.ru/images/list.html Use this GET request to retrieve a list of images. Specify parameters like items_per_page, page, and region. The type parameter is optional. ```bash curl \ -X GET \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ 'https://api.cloudvps.reg.ru/v2/images?type=application&items_per_page=10®ion=openstack-msk1&page=1' ``` -------------------------------- ### Get Virtual Server Information Source: https://developers.cloudvps.reg.ru/reglets/info.html Use this cURL command to send a GET request to the API to retrieve details for a specific virtual server. Replace with the actual server ID and ensure your authentication token is set. ```bash curl \ -X GET \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ 'https://api.cloudvps.reg.ru/v1/reglets/1' ``` -------------------------------- ### API Response for Backup Action Source: https://developers.cloudvps.reg.ru/reglets/switch_backups.html This is an example of the JSON response received after initiating an action to enable or disable backups. It indicates the status of the initiated task. ```json { "action":{ "status":"completed" }, "reglet_id":"15751" } ``` -------------------------------- ### Get List of Snapshots Source: https://developers.cloudvps.reg.ru/snapshots/list.html Use this cURL command to fetch a list of all available snapshots. Ensure you include your authorization token. ```bash curl \ -X GET \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ 'https://api.cloudvps.reg.ru/v1/snapshots' ``` -------------------------------- ### Get a list of tariffs Source: https://developers.cloudvps.reg.ru/sizes/index.html Use this endpoint to retrieve a list of available tariffs. Specify pagination parameters like `page` and `items_per_page`, and filter by `region`. Other optional filters include `plan_line`, `disk`, `memory`, and `vcpus`. ```bash curl \ -X GET \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ 'https://api.cloudvps.reg.ru/v2/plans?region=openstack-msk1&page=1&items_per_page=10' ``` -------------------------------- ### Private Network JSON Response Example Source: https://developers.cloudvps.reg.ru/vpcs/single.html This is an example of the JSON object returned when successfully retrieving details for a private network. It includes the network's resource ID, name, region, and connected members. ```json { "resource_id": "123", "name": "My private network", "region_slug": "msk1", "members": [ 1111, 1112, 1113 ], } ``` -------------------------------- ### Virtual Server Information Response Source: https://developers.cloudvps.reg.ru/reglets/info.html This is an example JSON response containing detailed information about a virtual server. It includes parameters such as disk size, memory, hostname, status, and image details. ```json { "reglet": { "archived_at": null, "created_at": "2018-07-12 02:40:27", "disk": 10, "disk_usage": 6.7, "hostname": "193-124-206-121.cloudvps.regruhosting.ru", "id": 6891, "image": { "created_at": "2017-10-31 10:55:48", "distribution": "ubuntu-16.04", "id": 3459, "min_disk_size": "10", "name": "Ubuntu 16.04 LTS", "private": 0, "region_slug":"msk1", "size_gigabytes": "2.4", "slug": "ubuntu-16-04-amd64", "type": "distribution" }, "image_id": 3459, "ip": "193.124.206.121", "ipv6": "2a00:f40:2:4:2::1", "locked": 0, "memory": 512, "name": "VNC", "ptr":"193-124-206-121.cloudvps.regruhosting.ru", "region_slug": "msk1", "service_id": 31386957, "size": { "archived":0, "disk": 10, "id": 5, "memory": 512, "name": "Cloud-1", "price":"0.00000", "price_month":"0.00000", "slug": "cloud-1", "vcpus": 1, "weight": 10 }, "size_slug": "cloud-1", "status": "active", "sub_status": null, "vcpus": 1 } } ``` -------------------------------- ### API Response Example for Private Network Members Source: https://developers.cloudvps.reg.ru/vpcs/members.html This is an example of the JSON response structure when successfully retrieving a list of resources connected to a private network. The `members` field contains an array of resource identifiers. ```json "members": [ 1111, 1112 ] ``` -------------------------------- ### GET /v1/prices Source: https://developers.cloudvps.reg.ru/billing/prices.html Retrieves a list of prices for available resources. ```APIDOC ## GET /v1/prices ### Description Retrieves a list of prices for available resources. ### Method GET ### Endpoint /v1/prices ### Parameters #### Query Parameters - **Authorization** (string) - Required - Bearer token for authentication - **Content-Type** (string) - Required - application/json ### Request Example ```curl curl \ -X GET \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ 'https://api.cloudvps.reg.ru/v1/prices' ``` ### Response #### Success Response (200) - **body** (object) - Contains pricing information for resources. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### GET /v1/snapshots Source: https://developers.cloudvps.reg.ru/snapshots/list.html Retrieves a list of all available snapshots for the account. ```APIDOC ## GET /v1/snapshots ### Description Retrieves a list of all available snapshots for the account. ### Method GET ### Endpoint /v1/snapshots ### Parameters ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **snapshots** (array) - An array of snapshot objects. - **id** (integer) - Unique identifier of the snapshot. - **slug** (null) - Always null for snapshots. - **name** (string) - Name of the snapshot. - **type** (string) - Type of the image, always 'snapshot' for snapshots. - **distribution** (string) - Base image used for the snapshot. - **private** (integer) - Indicates if the snapshot is private (always 1 for snapshots). - **size_gigabytes** (string) - Size of the snapshot in gigabytes. - **min_disk_size** (string) - Minimum disk size required to deploy this snapshot in gigabytes. - **created_at** (string) - Timestamp when the snapshot was created. #### Response Example ```json { "snapshots": [ { "created_at": "2018-07-12 02:42:00", "distribution": "ubuntu-16.04", "id": 6893, "min_disk_size": "10.00", "name": "snapshot 1", "private": 1, "size_gigabytes": "1.05", "slug": null, "type": "snapshot" } ] } ``` ``` -------------------------------- ### GET /v1/reglets/{reglet_id} Source: https://developers.cloudvps.reg.ru/reglets/info.html Retrieves detailed information about a specific virtual server. ```APIDOC ## GET /v1/reglets/{reglet_id} ### Description Retrieves detailed information about a specific virtual server using its unique ID. ### Method GET ### Endpoint /v1/reglets/ ### Parameters #### Path Parameters - **reglet_id** (integer) - Required - The unique identifier of the virtual server. ### Request Example ```bash curl \ -X GET \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ 'https://api.cloudvps.reg.ru/v1/reglets/1' ``` ### Response #### Success Response (200) - **reglet** (object) - Contains the server information. - **archived_at** (string) - Date of server deletion, or null. - **backups_enabled** (integer) - Indicates if backups are enabled (0 for no, 1 for yes). - **created_at** (string) - Date of server creation. - **disk** (integer) - Server disk size in GB. - **disk_usage** (float) - Actual disk usage in GB. - **hostname** (string) - Server hostname. - **id** (integer) - Unique server identifier. - **image** (object) - Data about the server image. - **created_at** (string) - Image creation date. - **distribution** (string) - Image distribution name. - **id** (integer) - Unique image identifier. - **min_disk_size** (string) - Minimum disk size required for the image. - **name** (string) - Name of the image. - **private** (integer) - Indicates if the image is private (0 for no, 1 for yes). - **region_slug** (string) - Region identifier for the image. - **size_gigabytes** (string) - Size of the image in GB. - **slug** (string) - Unique slug for the image. - **type** (string) - Type of the image (e.g., 'distribution'). - **image_id** (integer) - Unique identifier of the image on the server. - **ip** (string) - Primary IP address of the server. - **ipv6** (string) - IPv6 address of the server. - **locked** (integer) - Indicates if the server is locked (0 for no, 1 for yes). - **memory** (integer) - Server memory in MB. - **name** (string) - Name of the server. - **ptr** (string) - PTR record for the server. - **region_slug** (string) - Human-readable identifier of the region. - **service_id** (integer) - Identifier for the 'Cloud VPS' service (user-facing, but present in output). - **size** (object) - Data about the server's plan. - **archived** (integer) - Indicates if the plan is archived. - **disk** (integer) - Disk size of the plan in GB. - **id** (integer) - Unique plan identifier. - **memory** (integer) - Memory size of the plan in MB. - **name** (string) - Name of the plan. - **price** (string) - Price of the plan. - **price_month** (string) - Monthly price of the plan. - **slug** (string) - Human-readable identifier of the plan. - **vcpus** (integer) - Number of vCPUs in the plan. - **weight** (integer) - Weight of the plan. - **size_slug** (string) - Human-readable identifier of the server's plan. - **status** (string) - Current status of the server (e.g., 'new', 'active', 'off', 'suspended', 'archive'). - **sub_status** (string) - Sub-status of the server, or null. - **vcpus** (integer) - Number of virtual CPU cores. #### Response Example ```json { "reglet": { "archived_at": null, "created_at": "2018-07-12 02:40:27", "disk": 10, "disk_usage": 6.7, "hostname": "193-124-206-121.cloudvps.regruhosting.ru", "id": 6891, "image": { "created_at": "2017-10-31 10:55:48", "distribution": "ubuntu-16.04", "id": 3459, "min_disk_size": "10", "name": "Ubuntu 16.04 LTS", "private": 0, "region_slug":"msk1", "size_gigabytes": "2.4", "slug": "ubuntu-16-04-amd64", "type": "distribution" }, "image_id": 3459, "ip": "193.124.206.121", "ipv6": "2a00:f40:2:4:2::1", "locked": 0, "memory": 512, "name": "VNC", "ptr":"193-124-206-121.cloudvps.regruhosting.ru", "region_slug": "msk1", "service_id": 31386957, "size": { "archived":0, "disk": 10, "id": 5, "memory": 512, "name": "Cloud-1", "price":"0.00000", "price_month":"0.00000", "slug": "cloud-1", "vcpus": 1, "weight": 10 }, "size_slug": "cloud-1", "status": "active", "sub_status": null, "vcpus": 1 } } ``` ``` -------------------------------- ### GET /v1/reglets Source: https://developers.cloudvps.reg.ru/reglets/list.html Retrieves a list of all virtual servers associated with the account. The response includes detailed information about each server. ```APIDOC ## GET /v1/reglets ### Description Retrieves a list of virtual servers. The response contains an array of server objects under the `reglets` key. ### Method GET ### Endpoint /v1/reglets ### Parameters None ### Request Example ```bash curl \ -X GET \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ 'https://api.cloudvps.reg.ru/v1/reglets' ``` ### Response #### Success Response (200) Returns a JSON object containing a list of servers under the `reglets` key. Each server object includes details such as `id`, `name`, `hostname`, `ip`, `status`, `created_at`, `disk`, `memory`, `vcpus`, and more. **Server Object Fields:** - **archived_at** (string) - The date the server was archived. - **backups_enabled** (integer) - Indicates if backups are enabled (0 for no, 1 for yes). - **created_at** (string) - The date and time the server was created. - **disk** (integer) - The disk size of the server in GB. - **hostname** (string) - The hostname of the server. - **id** (integer) - The unique identifier of the server. - **image** (object) - Information about the server's image. - **image_id** (integer) - The unique identifier of the image used for the server. - **ip** (string) - The primary IPv4 address of the server. - **ipv6** (string) - The IPv6 address of the server. - **locked** (integer) - Indicates if the server is locked (0 for no, 1 for yes). - **memory** (integer) - The amount of memory on the server in MB. - **name** (string) - The name of the server. - **ptr** (string) - The PTR record for the server. - **region_slug** (string) - The human-readable identifier of the region. - **service_id** (integer) - The identifier for the 'Cloud VPS' service. - **size** (object) - Details about the server's plan. - **size_slug** (string) - The human-readable identifier of the server's plan. - **status** (string) - The current status of the server (e.g., `new`, `active`, `off`, `suspended`, `archive`). - **sub_status** (string) - The sub-status of the server. - **vcpus** (integer) - The number of virtual CPUs allocated to the server. **Server Status Values:** - **new**: Server is in the database but not yet created. - **active**: Server is created and running. - **off**: Server is shut down. - **suspended**: Server is suspended due to insufficient funds. - **archive**: Server has been deleted. #### Response Example ```json { "links": { "actions": [] }, "reglets": [ { "archived_at": null, "created_at": "2018-07-12 02:40:27", "disk": 10, "hostname": "193-124-206-121.cloudvps.regruhosting.ru", "id": 6891, "image": { "created_at": "2017-10-31 10:55:48", "distribution": "ubuntu-16.04", "id": 3459, "min_disk_size": "10", "name": "Ubuntu 16.04 LTS", "private": 0, "region_slug":"msk1", "size_gigabytes": "2.4", "slug": "ubuntu-16-04-amd64", "type": "distribution" }, "image_id": 3459, "ip": "193.124.206.121", "ipv6": "2a00:f40:2:4:2::1", "link_token":null, "locked": 0, "memory": 512, "name": "VNC", "ptr":"193-124-206-121.cloudvps.regruhosting.ru", "region_slug": "msk1", "service_id": 31386957, "size": { "archived":0, "disk": 10, "id": 5, "memory": 512, "name": "Cloud-1", "price":"0.00000", "price_month":"0.00000", "slug": "cloud-1", "vcpus": 1, "weight": 10 }, "size_slug": "cloud-1", "status": "active", "sub_status": null, "vcpus": 1 } ] } ``` ``` -------------------------------- ### API Response for Convert Backup to Snapshot Action Source: https://developers.cloudvps.reg.ru/images/convert.html This is an example of the JSON response received after initiating a backup to snapshot conversion. It provides details about the asynchronous action, including its ID, status, and associated resource. ```json { "action": { "completed_at": "2018-07-12 01:31:44", "created_at": "2019-03-04 18:11:01", "id": 119123, "region_slug": "msk1", "resource_id": 6867, "resource_type": "reglet", "started_at": "2018-07-12 01:31:44", "status": "in-progress", "type": "convert" } } ``` -------------------------------- ### GET Request for Resource Prices Source: https://developers.cloudvps.reg.ru/billing/prices.html Use this cURL command to fetch a list of available resource prices from the API. Ensure your authentication token is set. ```curl curl \ -X GET \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ 'https://api.cloudvps.reg.ru/v1/prices' ``` -------------------------------- ### ISPmanager License Resize Action Response Source: https://developers.cloudvps.reg.ru/reglets/isp_license.html This is an example of the response received after initiating an ISPmanager license resize action. It provides details about the asynchronous task, including its ID, status, and resource information. ```json { "action": { "completed_at": "2018-07-18 00:15:20", "id": 121237, "region_slug": "msk1", "resource_id": 6891, "resource_type": "reglet", "started_at": "2018-07-18 00:15:19", "status": "in-progress", "type": "isp_license_size" } } ``` -------------------------------- ### Get Balance and Cost Data Source: https://developers.cloudvps.reg.ru/billing/balance.html Use this cURL command to request current balance and cost data from the API. Ensure your authorization token is set. ```bash curl \ -X GET \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ 'https://api.cloudvps.reg.ru/v1/balance_data' ``` -------------------------------- ### Example Response for Additional IPs Source: https://developers.cloudvps.reg.ru/add-ip/list.html This JSON structure represents the response when requesting a list of additional IP addresses. It includes details such as creation date, ID, IP address, PTR record, region, associated reglet ID, status, and type. ```json { "ips": [ { "created_at": "2018-07-12 02:42:00", "id": 6893, "ip": "2a00:f940:2:4:4::e", "ptr": "2a00-f940-2-4-4-e.cloudvps.regruhosting.ru", "region_slug": "msk1", "reglet_id": "3319", "status": "active", "type": "ipv6" } ] } ``` -------------------------------- ### List Resources in Private Network (cURL) Source: https://developers.cloudvps.reg.ru/vpcs/members.html Use this cURL command to send a GET request to the API endpoint for listing members of a private network. Replace `<идентификатор-ресурса-сети>` with the actual network resource ID and ensure your `TOKEN` is set. ```bash curl \ -X GET \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ "https://api.cloudvps.reg.ru/v1/vpcs/123/members" ``` -------------------------------- ### POST /v1/reglets - Create Server Source: https://developers.cloudvps.reg.ru/reglets/add.html Creates a new virtual server instance. You can specify the server name, size (plan), image, SSH keys, and backup settings. The API uses v1 for server creation, though plan and image details can be fetched from v2. ```APIDOC ## POST /v1/reglets ### Description Creates a new virtual server instance. You can specify the server name, size (plan), image, SSH keys, and backup settings. The API uses v1 for server creation, though plan and image details can be fetched from v2. ### Method POST ### Endpoint /v1/reglets ### Parameters #### Request Body - **name** (string) - Optional - The name of the server. Can be auto-generated if not provided. - **size** (string) - Required - The unique identifier (slug) of the plan for the server. - **image** (string) - Required - The unique identifier (slug) of the image to use for the server. - **ssh_keys** (array of strings) - Optional - An array of identifiers for uploaded SSH keys. - **backups** (boolean) - Optional - Set to `true` to enable backups. - **isp_license_size** (string) - Optional - The ISPmanager license plan. Accepted values: `isp_lite6` (up to 10 domains), `isp_pro6` (11-50 domains), `isp_host6` (unlimited domains). ### Request Example ```json { "name": "Sandbox", "size": "cloud-1", "image": "docker-18.03ce", "ssh_keys": ["50:8c:26:58:b0:3c:96:24:14:e7:39:cb:2e:d8:5e:cd"], "backups": true } ``` ### Response #### Success Response (200) Returns information about the created server and a task object for monitoring the creation process. #### Response Example ```json { "links": { "actions": [ { "completed_at": "2018-07-12 02:33:09", "id": 119153, "region_slug": "msk1", "resource_id": 6889, "resource_type": "reglet", "started_at": "2018-07-12 02:33:09", "status": "in-progress", "type": "create" } ] }, "reglet": { "archived_at": null, "created_at": "2018-07-12 02:33:09", "disk": 10, "hostname": "193-124-206-117.cloudvps.regruhosting.ru", "id": 6889, "image": { "created_at": "2018-04-18 12:51:18", "distribution": "ubuntu-16.04", "id": 4597, "min_disk_size": 5, "name": "Docker 18.03.0-ce", "private": 0, "size_gigabytes": "1.7", "slug": "docker-18.03ce", "type": "application" }, "image_id": 4597, "ip": "193.124.206.117", "ipv6": "2a00:f940:2:4:2::1", "locked": 1, "memory": 512, "name": "Sandbox", "old_id": null, "region_slug": "msk1", "resource_id": 6889, "service_id": 31386957, "backups_enabled": "1", "size": { "disk": 10, "id": 5, "memory": 512, "name": "Cloud-1", "slug": "cloud-1", "vcpus": 1, "weight": 10 }, "size_slug": "cloud-1", "status": "new", "sub_status": null, "type": "reglet", "vcpus": 1 } } ``` ``` -------------------------------- ### GET /v1/ips/{ip_address} - Get Specific Additional IP Address Source: https://developers.cloudvps.reg.ru/add-ip/list.html Retrieves information about a specific additional IP address by its IP address. ```APIDOC ## GET /v1/ips/{ip_address} ### Description Retrieves information about a specific additional IP address. ### Method GET ### Endpoint /v1/ips/{ip_address} #### Path Parameters - **ip_address** (string) - Required - The IP address to retrieve details for. ### Request Example ```curl curl \ -X GET \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ 'https://api.cloudvps.reg.ru/v1/ips/2a00:f940:2:4:4::e' ``` ### Response #### Success Response (200) - **created_at** (string) - The date and time the IP address was connected. - **id** (integer) - The unique identifier of the IP address. - **ip** (string) - The IP address itself. - **ptr** (string) - The PTR DNS record for the IP address. - **region_slug** (string) - The unique human-readable name of the region. - **reglet_id** (string) - The ID of the reglet to which the IP address is bound. - **status** (string) - The current status of the IP address (e.g., 'active'). - **type** (string) - The type of the IP address ('ipv4' or 'ipv6'). #### Response Example ```json { "created_at": "2018-07-12 02:42:00", "id": 6893, "ip": "2a00:f940:2:4:4::e", "ptr": "2a00-f940-2-4-4-e.cloudvps.regruhosting.ru", "region_slug": "msk1", "reglet_id": "3319", "status": "active", "type": "ipv6" } ``` ``` -------------------------------- ### POST /v1/reglets/{server_id}/actions - Reinstall System Source: https://developers.cloudvps.reg.ru/reglets/rebuild.html Initiates a system reinstallation for a specified server. Requires the server ID and details about the new system image. ```APIDOC ## POST /v1/reglets/{server_id}/actions ### Description Initiates a system reinstallation for a specified server. Requires the server ID and details about the new system image. ### Method POST ### Endpoint /v1/reglets//actions ### Parameters #### Path Parameters - **server_id** (string) - Required - The unique identifier of the server to be reinstalled. #### Request Body - **type** (string) - Required - The operation type, must be "rebuild". - **image** (string) - Required - The unique identifier (slug) of the system image to install. ### Request Example ```json { "type": "rebuild", "image": "docker-18.03ce" } ``` ### Response #### Success Response (200) - **action** (object) - Information about the reinstallation task. - **completed_at** (string) - Timestamp when the action was completed. - **id** (integer) - The unique identifier of the action. - **region_slug** (string) - The region where the server is located. - **resource_id** (integer) - The ID of the resource (server) the action is associated with. - **resource_type** (string) - The type of the resource, should be "reglet". - **started_at** (string) - Timestamp when the action started. - **status** (string) - The current status of the action (e.g., "in-progress"). - **type** (string) - The type of action performed, should be "rebuild". #### Response Example ```json { "action": { "completed_at": "2018-07-18 00:15:20", "id": 121237, "region_slug": "msk1", "resource_id": 6891, "resource_type": "reglet", "started_at": "2018-07-18 00:15:19", "status": "in-progress", "type": "rebuild" } } ``` **Note**: Upon completion, an email with server access details will be sent to the user. ``` -------------------------------- ### Reinstall Server from Snapshot Source: https://developers.cloudvps.reg.ru/reglets/rebuild.html Initiate a server rebuild using a snapshot by providing the snapshot's unique identifier in the 'image' parameter. This is similar to reinstalling from an OS template. ```bash curl \ -X POST \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"type": "rebuild", "image": 6893}' \ 'https://api.cloudvps.reg.ru/v1/reglets/6891/actions' ``` -------------------------------- ### Enable Backups via API Source: https://developers.cloudvps.reg.ru/reglets/switch_backups.html Use this cURL command to send a POST request to enable the backup service for a specific virtual server. Ensure you replace `<идентификатор-сервера>` with the actual server ID and `$TOKEN` with your API token. ```bash curl \ -X POST \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"type": "enable_backups"}' \ 'https://api.cloudvps.reg.ru/v1/reglets/6867/actions' ``` -------------------------------- ### GET /v1/ips - List Additional IP Addresses Source: https://developers.cloudvps.reg.ru/add-ip/list.html Retrieves a list of all ordered additional IP addresses. This endpoint can be filtered by `reglet_id` to get IPs associated with a specific server. ```APIDOC ## GET /v1/ips ### Description Retrieves a list of all ordered additional IP addresses. ### Method GET ### Endpoint /v1/ips #### Query Parameters - **reglet_id** (string) - Optional - The ID of the reglet (server) to filter IP addresses by. ### Request Example ```curl curl \ -X GET \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ 'https://api.cloudvps.reg.ru/v1/ips' ``` ### Request Example with Filter ```curl curl \ -X GET \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ 'https://api.cloudvps.reg.ru/v1/ips?reglet_id=3319' ``` ### Response #### Success Response (200) - **ips** (array) - An array of IP address objects. - **created_at** (string) - The date and time the IP address was connected. - **id** (integer) - The unique identifier of the IP address. - **ip** (string) - The IP address itself. - **ptr** (string) - The PTR DNS record for the IP address. - **region_slug** (string) - The unique human-readable name of the region. - **reglet_id** (string) - The ID of the reglet to which the IP address is bound. - **status** (string) - The current status of the IP address (e.g., 'active'). - **type** (string) - The type of the IP address ('ipv4' or 'ipv6'). #### Response Example ```json { "ips": [ { "created_at": "2018-07-12 02:42:00", "id": 6893, "ip": "2a00:f940:2:4:4::e", "ptr": "2a00-f940-2-4-4-e.cloudvps.regruhosting.ru", "region_slug": "msk1", "reglet_id": "3319", "status": "active", "type": "ipv6" } ] } ``` ``` -------------------------------- ### POST /v1/reglets/{server_id}/actions - Reinstall from Snapshot Source: https://developers.cloudvps.reg.ru/reglets/rebuild.html Reinstalls a server using a specified snapshot. This is similar to reinstalling from an image, but uses a snapshot identifier. ```APIDOC ## POST /v1/reglets/{server_id}/actions ### Description Reinstalls a server using a specified snapshot. This is similar to reinstalling from an image, but uses a snapshot identifier. ### Method POST ### Endpoint /v1/reglets//actions ### Parameters #### Path Parameters - **server_id** (string) - Required - The unique identifier of the server to be reinstalled. #### Request Body - **type** (string) - Required - The operation type, must be "rebuild". - **image** (integer) - Required - The unique identifier of the snapshot to install. ### Request Example ```json { "type": "rebuild", "image": 6893 } ``` ### Response #### Success Response (200) - **action** (object) - Information about the reinstallation task. - **completed_at** (string) - Timestamp when the action was completed. - **id** (integer) - The unique identifier of the action. - **region_slug** (string) - The region where the server is located. - **resource_id** (integer) - The ID of the resource (server) the action is associated with. - **resource_type** (string) - The type of the resource, should be "reglet". - **started_at** (string) - Timestamp when the action started. - **status** (string) - The current status of the action (e.g., "in-progress"). - **type** (string) - The type of action performed, should be "rebuild". #### Response Example ```json { "action": { "completed_at": "2018-07-18 00:15:20", "id": 121237, "region_slug": "msk1", "resource_id": 6891, "resource_type": "reglet", "started_at": "2018-07-18 00:15:19", "status": "in-progress", "type": "rebuild" } } ``` **Note**: Upon completion, an email with server access details will be sent to the user. ``` -------------------------------- ### Reinstall System with Docker Image Source: https://developers.cloudvps.reg.ru/reglets/rebuild.html Use this command to rebuild a server using a specific Docker image. Ensure you have a valid API token and server ID. ```bash curl \ -X POST \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"type": "rebuild", "image": "docker-18.03ce"}' \ 'https://api.cloudvps.reg.ru/v1/reglets/6891/actions' ```