Quản lý Cloud VPS

Quản lý Cloud VPS: 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 VPS: 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 Backup, Danh sách Cloud VPS, Danh sách Snapshot
  • Thông tin chi tiết: Chi tiết Cloud VPS, Thông tin Server VPS
  • Bảo mật: Lấy Private Key, Lấy SSH Key Pair, Reset mật khẩu VPS
  • Quản lý: Cập nhật ghi chú VPS, Cấu hình Auto Snapshot, Tạo Snapshot
  • Hành động: Reboot Hard VPS, Reboot Soft VPS, Shutdown VPS
  • 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 Backup

GET /vps/{vpsId}/backup

Lấy danh sách backup volume của Cloud VPS.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/vps/{vpsId}/backup"

Danh sách Cloud VPS

GET /vps

Lấy danh sách Cloud VPS với bộ lọc và phân trang.

Tham sốVị tríKiểuBắt buộcMô tả
namequerystringKhôngLọc theo tên VPS (để trống = tất cả)
statusquerystringKhôngLọc theo trạng thái: trial, active, suspended, expired
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/vps"

Response

JSON
{
  "size": 1,
  "number": 1,
  "content": [
    {
      "id": 1,
      "name": "example_name",
      "image": "example_image",
      "planId": 1,
      "status": "example_status",
      "planName": "example_planName",
      "roidType": "example_roidType",
      "trialDay": 1,
      "issueDate": "example_issueDate",
      "dataExtend": "example_dataExtend",
      "expireDate": "example_expireDate",
      "flagCpanel": true,
      "createdDate": "example_createdDate",
      "autoSnapshot": 1
    }
  ],
  "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 VPS
content[].idintegerID Cloud VPS
content[].namestringTên VPS
content[].imagestringTên OS image
content[].planIdintegerID gói dịch vụ
content[].statusstringTrạng thái: trial, active, suspended, expired
content[].planNamestringTên gói dịch vụ
content[].roidTypestringLoại dịch vụ (vps)
content[].trialDayintegerSố ngày dùng thử (0 = không trial)
content[].issueDatestringNgày kích hoạt (dd/MM/yyyy HH:mm)
content[].dataExtendstringJSON chứa thông số kỹ thuật VPS (CPU, RAM, disk, IP, volume...)
content[].expireDatestringNgày hết hạn (dd/MM/yyyy HH:mm)
content[].flagCpanelbooleanCó cPanel hay không
content[].createdDatestringNgày tạo (dd/MM/yyyy HH:mm)
content[].autoSnapshotintegerSố ngày auto snapshot (0 = tắt)
totalPagesintegerTổng số trang
totalElementsintegerTổng số bản ghi
numberOfElementsintegerSố phần tử trang hiện tại

Danh sách Snapshot

GET /vps/{vpsId}/snapshot

Lấy danh sách snapshot của Cloud VPS.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/vps/{vpsId}/snapshot"

Thông tin chi tiết

Chi tiết Cloud VPS

GET /vps/{vpsId}

Lấy thông tin chi tiết Cloud VPS theo ID.

Tham sốVị tríKiểuBắt buộcMô tả
vpsIdpathstringID của VPS
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/vps/{vpsId}"

Response

JSON
{
  "id": 1,
  "name": "example_name",
  "note": "example_note",
  "image": "example_image",
  "planId": 1,
  "status": "example_status",
  "planName": "example_planName",
  "roidType": "example_roidType",
  "trialDay": 1,
  "issueDate": "example_issueDate",
  "dataExtend": "example_dataExtend",
  "expireDate": "example_expireDate",
  "flagCpanel": true,
  "createdDate": "example_createdDate",
  "autoSnapshot": 1
}
TrườngKiểuMô tả
idintegerID Cloud VPS
namestringTên VPS
notestringGhi chú
imagestringTên OS image
planIdintegerID gói dịch vụ
statusstringTrạng thái: trial, active, suspended, expired
planNamestringTên gói dịch vụ
roidTypestringLoại dịch vụ (vps)
trialDayintegerSố ngày dùng thử (0 = không trial)
issueDatestringNgày kích hoạt (dd/MM/yyyy HH:mm)
dataExtendstringJSON chứa thông số kỹ thuật VPS (CPU, RAM, disk, IP, volume...)
expireDatestringNgày hết hạn (dd/MM/yyyy HH:mm)
flagCpanelbooleanCó cPanel hay không
createdDatestringNgày tạo (dd/MM/yyyy HH:mm)
autoSnapshotintegerSố ngày auto snapshot (0 = tắt)

Thông tin Server VPS

GET /vps/{vpsId}/getserver

Lấy thông tin server (CPU, RAM, disk, IP) của Cloud VPS.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/vps/{vpsId}/getserver"

Response

JSON
{
  "id": "example_id",
  "name": "example_name",
  "flavor": {
    "ram": 1,
    "disk": 1,
    "vcpus": 1
  },
  "status": "example_status",
  "key_name": "example_key_name",
  "addresses": "example_addresses",
  "OS-EXT-STS:vm_state": "example_OS-EXT-STS:vm_state",
  "OS-EXT-STS:power_state": "example_OS-EXT-STS:power_state"
}
TrườngKiểuMô tả
idstringUUID server
namestringTên server
flavorobjectCấu hình phần cứng
flavor.ramintegerRAM (MB)
flavor.diskintegerDisk (GB)
flavor.vcpusintegerSố vCPU
statusstringTrạng thái (active, shutoff, error)
key_namestringTên SSH keypair
addressesobjectĐịa chỉ IP theo network
OS-EXT-STS:vm_statestringTrạng thái VM (active, stopped)
OS-EXT-STS:power_statestringTrạng thái nguồn (1=running, 4=shutdown)

Bảo mật

Lấy Private Key

GET /vps/{vpsId}/privatekey

Lấy SSH private key của Cloud VPS.

Tham sốVị tríKiểuBắt buộcMô tả
typeKeyquerystringLoại key: 'linux' (RSA PEM) hoặc 'windows' (PuTTY PPK format)
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/vps/{vpsId}/privatekey?typeKey=value"

Lấy SSH Key Pair

GET /vps/{vpsId}/keypair

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

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/vps/{vpsId}/keypair"

Response

JSON
{
  "name": "example_name",
  "public_key": "example_public_key",
  "fingerprint": "example_fingerprint"
}
TrườngKiểuMô tả
namestringTên SSH key pair
public_keystringSSH public key (RSA format)
fingerprintstringFingerprint của SSH public key

Reset mật khẩu VPS

POST /vps/{vpsId}/password

Reset mật khẩu root/admin của Cloud VPS.

Tham sốVị tríKiểuBắt buộcMô tả
vpsIdpathstringID của VPS
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://developers-dev.inet.vn/api/gateway/v1/vps/{vpsId}/password"

Quản lý

Cập nhật ghi chú VPS

PATCH /vps/{vpsId}/note

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

Tham sốVị tríKiểuBắt buộcMô tả
vpsIdpathstringID của VPS

Request Body

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

Response

JSON
{
  "id": 1,
  "note": "example_note",
  "modifiedDate": "example_modifiedDate"
}
TrườngKiểuMô tả
idintegerID Cloud VPS
notestringGhi chú vừa cập nhật
modifiedDatestringThời điểm cập nhật ghi chú

Cấu hình Auto Snapshot

PATCH /vps/{vpsId}/auto-snapshot

Cấu hình tự động tạo snapshot định kỳ cho Cloud VPS.

Tham sốVị tríKiểuBắt buộcMô tả
vpsIdpathstringID của VPS

Request Body

TrườngKiểuBắt buộcMô tả
autoSnapshotintegerSố ngày tự động snapshot (0 = tắt, 3 = mỗi 3 ngày)
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/vps/{vpsId}/auto-snapshot"

Response

JSON
{
  "id": 1,
  "autoSnapshot": 1,
  "modifiedDate": "example_modifiedDate",
  "autoSnapshotDate": "example_autoSnapshotDate"
}
TrườngKiểuMô tả
idintegerID Cloud VPS
autoSnapshotintegerSố ngày auto snapshot đã cập nhật
modifiedDatestringThời điểm cập nhật
autoSnapshotDatestringNgày dự kiến tạo snapshot tiếp theo (dd/MM/yyyy HH:mm)

Tạo Snapshot

POST /vps/{vpsId}/snapshot

Tạo snapshot cho Cloud VPS.

Tham sốVị tríKiểuBắt buộcMô tả
vpsIdpathstringID của VPS
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://developers-dev.inet.vn/api/gateway/v1/vps/{vpsId}/snapshot"

Tạo Volume

POST /vps/{vpsId}/volume

Tạo volume (ổ đĩa) mới cho Cloud VPS.

Tham sốVị tríKiểuBắt buộcMô tả
vpsIdpathstringID của VPS

Request Body

TrườngKiểuBắt buộcMô tả
imagestringTên image (VD: Ubuntu-22.04)
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/vps/{vpsId}/volume"

Xóa Backup

DELETE /vps/{vpsId}/backup/{backupId}

Xóa backup volume của Cloud VPS.

Tham sốVị tríKiểuBắt buộcMô tả
vpsIdpathstringID của VPS
backupIdpathstringID của backup
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/vps/{vpsId}/backup/{backupId}"

Xóa Snapshot

DELETE /vps/{vpsId}/snapshot/{snapshotId}

Xóa snapshot của Cloud VPS.

Tham sốVị tríKiểuBắt buộcMô tả
vpsIdpathstringID của VPS
snapshotIdpathstringID của snapshot
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/vps/{vpsId}/snapshot/{snapshotId}"

Xóa Volume

DELETE /vps/{vpsId}/volume/{volumeId}

Xóa volume (ổ đĩa) của Cloud VPS.

Tham sốVị tríKiểuBắt buộcMô tả
vpsIdpathstringID của VPS
volumeIdpathstringID của volume
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/vps/{vpsId}/volume/{volumeId}"

Hành động

Reboot Hard VPS

POST /vps/{vpsId}/reboot-hard

Khởi động lại Cloud VPS (hard reboot - ép buộc restart ngay lập tức).

Tham sốVị tríKiểuBắt buộcMô tả
vpsIdpathstringID của VPS
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://developers-dev.inet.vn/api/gateway/v1/vps/{vpsId}/reboot-hard"

Reboot Soft VPS

POST /vps/{vpsId}/reboot-soft

Khởi động lại Cloud VPS (soft reboot - gửi tín hiệu shutdown rồi start).

Tham sốVị tríKiểuBắt buộcMô tả
vpsIdpathstringID của VPS
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://developers-dev.inet.vn/api/gateway/v1/vps/{vpsId}/reboot-soft"

Shutdown VPS

POST /vps/{vpsId}/shutdown

Tắt Cloud VPS.

Tham sốVị tríKiểuBắt buộcMô tả
vpsIdpathstringID của VPS
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://developers-dev.inet.vn/api/gateway/v1/vps/{vpsId}/shutdown"

Start VPS

POST /vps/{vpsId}/start

Bật Cloud VPS đang tắt.

Tham sốVị tríKiểuBắt buộcMô tả
vpsIdpathstringID của VPS
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://developers-dev.inet.vn/api/gateway/v1/vps/{vpsId}/start"

URL Console VPS

GET /vps/{vpsId}/console

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

Tham sốVị tríKiểuBắt buộcMô tả
vpsIdpathstringID của VPS
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://developers-dev.inet.vn/api/gateway/v1/vps/{vpsId}/console"