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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
name | query | string | Không | Lọc theo tên Cloud Server (để trống = tất cả) |
status | query | string | Không | Lọc theo trạng thái (VD: active, trial, suspended) |
page | query | integer | Không | Số trang (bắt đầu từ 1) |
pageSize | query | integer | Không | Số bản ghi mỗi trang |
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://developers-dev.inet.vn/api/gateway/v1/cloud-server"Response
{
"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ường | Kiểu | Mô tả |
|---|---|---|
size | integer | Kích thước trang |
number | integer | Trang hiện tại (0-based) |
content | array | Danh sách Cloud Server |
content[].id | integer | ID Cloud Server |
content[].name | string | Tên Cloud Server |
content[].type | string | Loại server (VD: CS-Turbo) |
content[].image | string | Tên OS image (VD: Ubuntu-24.04-LTS) |
content[].planId | integer | ID gói server |
content[].status | string | Trạng thái: active, suspended, trial, expired |
content[].planName | string | Tên gói server (VD: Turbo Cloud Server 2) |
content[].roidType | string | Loại dịch vụ (cloudserver) |
content[].trialDay | integer | Số ngày dùng thử (0 = không trial) |
content[].issueDate | string | Ngày cấp (MM/dd/yyyy HH:mm) |
content[].dataExtend | string | JSON chứa thông số kỹ thuật server (CPU, RAM, disk, IP, ports) |
content[].expireDate | string | Ngày hết hạn (MM/dd/yyyy HH:mm) |
content[].createdDate | string | Ngày tạo |
content[].modifiedDate | string | Ngày cập nhật |
totalPages | integer | Tổng số trang |
totalElements | integer | Tổng số bản ghi |
numberOfElements | integer | Số 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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID 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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID Cloud Server |
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}"Response
{
"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ường | Kiểu | Mô tả |
|---|---|---|
id | integer | ID Cloud Server |
name | string | Tên Cloud Server |
type | string | Loại server (VD: CS-Turbo) |
image | string | Tên OS image (VD: Ubuntu-24.04-LTS) |
planId | integer | ID gói server |
status | string | Trạng thái: active, suspended, trial, expired |
planName | string | Tên gói server |
roidType | string | Loại dịch vụ (cloudserver) |
trialDay | integer | Số ngày dùng thử (0 = không trial) |
issueDate | string | Ngày cấp (MM/dd/yyyy HH:mm) |
dataExtend | string | JSON chứa thông số kỹ thuật server (CPU, RAM, disk, IP, ports) |
expireDate | string | Ngày hết hạn (MM/dd/yyyy HH:mm) |
createdDate | string | Ngày tạo |
modifiedDate | string | Ngà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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID Cloud Server |
portId | path | string | Có | Port ID (UUID) |
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/port/{portId}"Response
{
"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ường | Kiểu | Mô tả |
|---|---|---|
port | object | |
port.id | string | Port ID (UUID) |
port.name | string | Tên port |
port.status | string | Trạng thái port (ACTIVE, DOWN...) |
port.fixed_ips | array | Danh sách IP gắn với port |
port.admin_state_up | boolean | Trạ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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID 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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID Cloud Server |
portId | path | string | Có | Port 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
{
"port": {
"id": "example_id",
"name": "example_name",
"status": "example_status",
"fixed_ips": [
{
"ip_address": "example_ip_address"
}
],
"admin_state_up": true
}
}
| Trường | Kiểu | Mô tả |
|---|---|---|
port | object | |
port.id | string | Port ID (UUID) |
port.name | string | Tên port |
port.status | string | Trạng thái port (ACTIVE, DOWN) |
port.fixed_ips | array | |
port.admin_state_up | boolean | false = 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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID 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
{
"id": 1,
"password": "example_password"
}
| Trường | Kiểu | Mô tả |
|---|---|---|
id | integer | ID Cloud Server |
password | string | Mậ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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID Cloud Server |
portId | path | string | Có | Port 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
{
"port": {
"id": "example_id",
"name": "example_name",
"status": "example_status",
"fixed_ips": [
{
"ip_address": "example_ip_address"
}
],
"admin_state_up": true
}
}
| Trường | Kiểu | Mô tả |
|---|---|---|
port | object | |
port.id | string | Port ID (UUID) |
port.name | string | Tên port |
port.status | string | Trạng thái port (ACTIVE, DOWN) |
port.fixed_ips | array | |
port.admin_state_up | boolean | true = 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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID Cloud Server |
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/keypair"Response
{
"name": "example_name",
"publicKey": "example_publicKey",
"privateKey": "example_privateKey",
"cloudServerId": 1
}
| Trường | Kiểu | Mô tả |
|---|---|---|
name | string | Tên SSH key pair |
publicKey | string | Public key (SSH RSA format) |
privateKey | string | Private key (RSA PEM format) |
cloudServerId | integer | ID 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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID Cloud Server |
Request Body
| Trường | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
note | string | Có | Nội dung ghi chú |
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/note"Response
{
"id": 1,
"note": "example_note"
}
| Trường | Kiểu | Mô tả |
|---|---|---|
id | integer | ID Cloud Server |
note | string | Ghi 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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID Cloud Server |
Request Body
| Trường | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
n8nDomain | string | Có | Domain 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
{
"id": 1
}
| Trường | Kiểu | Mô tả |
|---|---|---|
id | integer | ID 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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID 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
{
"id": 1,
"status": "example_status"
}
| Trường | Kiểu | Mô tả |
|---|---|---|
id | integer | ID Cloud Server |
status | string | Trạ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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID 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
{
"id": 1,
"status": "example_status"
}
| Trường | Kiểu | Mô tả |
|---|---|---|
id | integer | ID Cloud Server |
status | string | Trạ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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID 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
{
"id": 1,
"status": "example_status"
}
| Trường | Kiểu | Mô tả |
|---|---|---|
id | integer | ID Cloud Server |
status | string | Trạ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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID Cloud Server |
portId | path | string | Có | Port 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
{
"id": 1,
"status": "example_status"
}
| Trường | Kiểu | Mô tả |
|---|---|---|
id | integer | ID Cloud Server |
status | string | Trạ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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID 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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID 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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID Cloud Server |
Request Body
| Trường | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
image | string | Có | Tê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
{
"id": 1,
"image": "example_image",
"status": "example_status"
}
| Trường | Kiểu | Mô tả |
|---|---|---|
id | integer | ID Cloud Server |
image | string | Tên OS image đã rebuild |
status | string | Trạ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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID 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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID 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ểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
cloudServerId | path | integer | Có | ID Cloud Server |
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://developers-dev.inet.vn/api/gateway/v1/cloud-server/{cloudServerId}/console"