Quản lý Cloud Server

Quản lý Cloud Server: Danh sách, Thông tin chi tiết, Bảo mật, Quản lý, Hành động

Tổng quan

Quản lý Cloud Server: Danh sách, Thông tin chi tiết, Bảo mật, Quản lý, Hành động

  • Danh sách: Danh sách Cloud Server, Log hành động Cloud Server
  • Thông tin chi tiết: Chi tiết Cloud Server, Lấy thông tin Port IP, Trạng thái N8N
  • Bảo mật: Disable Port IP, Đổi mật khẩu Cloud Server, Enable Port IP
  • Quản lý: Cập nhật ghi chú Cloud Server, Đổi domain N8N, Gắn IP LAN
  • Hành động: Reboot Hard Cloud Server, Reboot Soft Cloud Server, Rebuild Cloud Server
  • Authentication: API key Bearer token qua header Authorization: Bearer YOUR_API_KEY

Base URL: https://developers-dev.inet.vn/api/gateway/v1

Response wrapper: Tất cả response được wrap trong { success, data, meta }. Response schema bên dưới mô tả nội dung field data. Xem chi tiết tại Response Format.


Danh sách

Danh sách Cloud Server

GET /cloud-server

Lấy danh sách Cloud Server của khách hàng, hỗ trợ phân trang và lọc theo tên/trạng thái.

Tham sốVị tríKiểuBắt buộcMô tả
namequerystringKhôngLọc theo tên Cloud Server (để trống = tất cả)
statusquerystringKhôngLọc theo trạng thái (VD: active, trial, suspended)
pagequeryintegerKhôngSố trang (bắt đầu từ 1)
pageSizequeryintegerKhôngSố bản ghi mỗi trang
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server"

Response

JSON
{
  "size": 1,
  "number": 1,
  "content": [
    {
      "id": 1,
      "name": "example_name",
      "type": "CS-Turbo",
      "image": "Ubuntu-24.04-LTS",
      "planId": 1,
      "status": "example_status",
      "planName": "Turbo Cloud Server 2",
      "roidType": "example_roidType",
      "trialDay": 1,
      "issueDate": "example_issueDate",
      "dataExtend": "example_dataExtend",
      "expireDate": "example_expireDate",
      "createdDate": "example_createdDate",
      "modifiedDate": "example_modifiedDate"
    }
  ],
  "totalPages": 1,
  "totalElements": 1,
  "numberOfElements": 1
}
TrườngKiểuMô tả
sizeintegerKích thước trang
numberintegerTrang hiện tại (0-based)
contentarrayDanh sách Cloud Server
content[].idintegerID Cloud Server
content[].namestringTên Cloud Server
content[].typestringLoại server (VD: CS-Turbo)
content[].imagestringTên OS image (VD: Ubuntu-24.04-LTS)
content[].planIdintegerID gói server
content[].statusstringTrạng thái: active, suspended, trial, expired
content[].planNamestringTên gói server (VD: Turbo Cloud Server 2)
content[].roidTypestringLoại dịch vụ (cloudserver)
content[].trialDayintegerSố ngày dùng thử (0 = không trial)
content[].issueDatestringNgày cấp (MM/dd/yyyy HH:mm)
content[].dataExtendstringJSON chứa thông số kỹ thuật server (CPU, RAM, disk, IP, ports)
content[].expireDatestringNgày hết hạn (MM/dd/yyyy HH:mm)
content[].createdDatestringNgày tạo
content[].modifiedDatestringNgày cập nhật
totalPagesintegerTổng số trang
totalElementsintegerTổng số bản ghi
numberOfElementsintegerSố phần tử trang hiện tại

Log hành động Cloud Server

GET /cloud-server/{cloudServerId}/log

Xem lịch sử hành động (reboot, shutdown, rebuild...) của Cloud Server.

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/log"

Thông tin chi tiết

Chi tiết Cloud Server

GET /cloud-server/{cloudServerId}

Lấy thông tin chi tiết Cloud Server theo ID (CPU, RAM, disk, network, OS, trạng thái).

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}"

Response

JSON
{
  "id": 1,
  "name": "example_name",
  "type": "CS-Turbo",
  "image": "Ubuntu-24.04-LTS",
  "planId": 1,
  "status": "example_status",
  "planName": "example_planName",
  "roidType": "example_roidType",
  "trialDay": 1,
  "issueDate": "example_issueDate",
  "dataExtend": "example_dataExtend",
  "expireDate": "example_expireDate",
  "createdDate": "example_createdDate",
  "modifiedDate": "example_modifiedDate"
}
TrườngKiểuMô tả
idintegerID Cloud Server
namestringTên Cloud Server
typestringLoại server (VD: CS-Turbo)
imagestringTên OS image (VD: Ubuntu-24.04-LTS)
planIdintegerID gói server
statusstringTrạng thái: active, suspended, trial, expired
planNamestringTên gói server
roidTypestringLoại dịch vụ (cloudserver)
trialDayintegerSố ngày dùng thử (0 = không trial)
issueDatestringNgày cấp (MM/dd/yyyy HH:mm)
dataExtendstringJSON chứa thông số kỹ thuật server (CPU, RAM, disk, IP, ports)
expireDatestringNgày hết hạn (MM/dd/yyyy HH:mm)
createdDatestringNgày tạo
modifiedDatestringNgày cập nhật

Lấy thông tin Port IP

GET /cloud-server/{cloudServerId}/port/{portId}

Lấy thông tin chi tiết port IP của Cloud Server.

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server
portIdpathstringPort ID (UUID)
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/port/{portId}"

Response

JSON
{
  "port": {
    "id": "example_id",
    "name": "example_name",
    "status": "example_status",
    "fixed_ips": [
      {
        "ip_address": "example_ip_address",
        "subnetGetResponse": {
          "subnet": {
            "cidr": "103.72.99.0/24",
            "gateway_ip": "example_gateway_ip"
          }
        }
      }
    ],
    "admin_state_up": true
  }
}
TrườngKiểuMô tả
portobject
port.idstringPort ID (UUID)
port.namestringTên port
port.statusstringTrạng thái port (ACTIVE, DOWN...)
port.fixed_ipsarrayDanh sách IP gắn với port
port.admin_state_upbooleanTrạng thái admin (true = enabled)

Trạng thái N8N

GET /cloud-server/{cloudServerId}/n8n

Lấy trạng thái cài đặt N8N trên Cloud Server.

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/n8n"

Bảo mật

Disable Port IP

POST /cloud-server/{cloudServerId}/port/{portId}/disable

Vô hiệu hóa một port IP trên Cloud Server (admin_state_up = false).

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server
portIdpathstringPort ID (UUID)
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/port/{portId}/disable"

Response

JSON
{
  "port": {
    "id": "example_id",
    "name": "example_name",
    "status": "example_status",
    "fixed_ips": [
      {
        "ip_address": "example_ip_address"
      }
    ],
    "admin_state_up": true
  }
}
TrườngKiểuMô tả
portobject
port.idstringPort ID (UUID)
port.namestringTên port
port.statusstringTrạng thái port (ACTIVE, DOWN)
port.fixed_ipsarray
port.admin_state_upbooleanfalse = disabled

Đổi mật khẩu Cloud Server

POST /cloud-server/{cloudServerId}/password

Đổi mật khẩu root/admin của Cloud Server.

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/password"

Response

JSON
{
  "id": 1,
  "password": "example_password"
}
TrườngKiểuMô tả
idintegerID Cloud Server
passwordstringMật khẩu root mới

Enable Port IP

POST /cloud-server/{cloudServerId}/port/{portId}/enable

Kích hoạt lại một port IP trên Cloud Server (admin_state_up = true).

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server
portIdpathstringPort ID (UUID)
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/port/{portId}/enable"

Response

JSON
{
  "port": {
    "id": "example_id",
    "name": "example_name",
    "status": "example_status",
    "fixed_ips": [
      {
        "ip_address": "example_ip_address"
      }
    ],
    "admin_state_up": true
  }
}
TrườngKiểuMô tả
portobject
port.idstringPort ID (UUID)
port.namestringTên port
port.statusstringTrạng thái port (ACTIVE, DOWN)
port.fixed_ipsarray
port.admin_state_upbooleantrue = enabled

Lấy SSH Key Pair

GET /cloud-server/{cloudServerId}/keypair

Lấy SSH key pair của Cloud Server.

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/keypair"

Response

JSON
{
  "name": "example_name",
  "publicKey": "example_publicKey",
  "privateKey": "example_privateKey",
  "cloudServerId": 1
}
TrườngKiểuMô tả
namestringTên SSH key pair
publicKeystringPublic key (SSH RSA format)
privateKeystringPrivate key (RSA PEM format)
cloudServerIdintegerID Cloud Server

Quản lý

Cập nhật ghi chú Cloud Server

PATCH /cloud-server/{cloudServerId}/note

Cập nhật ghi chú cho Cloud Server.

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server

Request Body

TrườngKiểuBắt buộcMô tả
notestringNội dung ghi chú
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/note"

Response

JSON
{
  "id": 1,
  "note": "example_note"
}
TrườngKiểuMô tả
idintegerID Cloud Server
notestringGhi chú vừa cập nhật

Đổi domain N8N

POST /cloud-server/{cloudServerId}/n8n/domain

Thay đổi custom domain cho N8N trên Cloud Server.

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server

Request Body

TrườngKiểuBắt buộcMô tả
n8nDomainstringDomain N8N mới (VD: example.ezn8n.com)
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"n8nDomain":"example_n8nDomain"}' \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/n8n/domain"

Response

JSON
{
  "id": 1
}
TrườngKiểuMô tả
idintegerID Cloud Server

Gắn IP LAN

POST /cloud-server/{cloudServerId}/ip/lan

Gắn IP LAN (private network) vào Cloud Server.

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/ip/lan"

Response

JSON
{
  "id": 1,
  "status": "example_status"
}
TrườngKiểuMô tả
idintegerID Cloud Server
statusstringTrạng thái server

Gắn IP Public

POST /cloud-server/{cloudServerId}/ip

Gắn thêm IP public vào Cloud Server.

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/ip"

Response

JSON
{
  "id": 1,
  "status": "example_status"
}
TrườngKiểuMô tả
idintegerID Cloud Server
statusstringTrạng thái server

Gắn IPv6

POST /cloud-server/{cloudServerId}/ip/v6

Gắn IPv6 vào Cloud Server.

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/ip/v6"

Response

JSON
{
  "id": 1,
  "status": "example_status"
}
TrườngKiểuMô tả
idintegerID Cloud Server
statusstringTrạng thái server

Gỡ IP khỏi Cloud Server

DELETE /cloud-server/{cloudServerId}/port/{portId}

Gỡ một port IP khỏi Cloud Server. Sau khi gỡ, IP sẽ được giải phóng.

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server
portIdpathstringPort ID cần gỡ (UUID)
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/port/{portId}"

Response

JSON
{
  "id": 1,
  "status": "example_status"
}
TrườngKiểuMô tả
idintegerID Cloud Server
statusstringTrạng thái server

Hành động

Reboot Hard Cloud Server

POST /cloud-server/{cloudServerId}/reboot-hard

Khởi động lại Cloud Server (hard reboot — ép buộc, tương đương rút điện). Trả về HTTP 200 với body rỗng khi thành công.

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/reboot-hard"

Reboot Soft Cloud Server

POST /cloud-server/{cloudServerId}/reboot-soft

Khởi động lại Cloud Server (soft reboot — gửi tín hiệu shutdown graceful). Trả về HTTP 200 với body rỗng khi thành công.

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/reboot-soft"

Rebuild Cloud Server

POST /cloud-server/{cloudServerId}/rebuild

Rebuild Cloud Server từ image/snapshot. Toàn bộ dữ liệu trên disk sẽ bị xóa.

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server

Request Body

TrườngKiểuBắt buộcMô tả
imagestringTên image hoặc snapshot (VD: SNAPSHOT-CS-Turbo-20240304102236137)
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"image":"example_image"}' \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/rebuild"

Response

JSON
{
  "id": 1,
  "image": "example_image",
  "status": "example_status"
}
TrườngKiểuMô tả
idintegerID Cloud Server
imagestringTên OS image đã rebuild
statusstringTrạng thái sau rebuild

Shutdown Cloud Server

POST /cloud-server/{cloudServerId}/shutdown

Tắt Cloud Server. Trả về HTTP 200 với body rỗng khi thành công.

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/shutdown"

Start Cloud Server

POST /cloud-server/{cloudServerId}/start

Bật Cloud Server đang tắt. Trả về HTTP 200 với body rỗng khi thành công.

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/start"

URL Console Cloud Server

GET /cloud-server/{cloudServerId}/console

Lấy URL truy cập console (noVNC) của Cloud Server.

Tham sốVị tríKiểuBắt buộcMô tả
cloudServerIdpathintegerID Cloud Server
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/console"