Đăng nhập
Cloud VPS Hosting Tên miền Proxy
Cloud VPS Hosting Tên miền Quản lý Proxy
Trang chủ
Dịch vụ
Nạp tiền
Lịch sử
Tài khoản

API VPS Cloud

Tài liệu hướng dẫn tích hợp API dịch vụ VPS Cloud — mua, quản lý, thao tác VPS

Xác thực API

Đang tải...

API Thường
API Agency
GET

Danh sách gói VPS

Lấy danh sách tất cả gói VPS Cloud đang bán, bao gồm thông tin cấu hình và giá sau chiết khấu.

GET https://dichvudark.vip/api/vps-gold/services?key_app={key_app}&token={token}
curl -X GET "https://dichvudark.vip/api/vps-gold/services?key_app=YOUR_KEY_APP&token=YOUR_TOKEN"
GET

Danh sách OS

Lấy danh sách hệ điều hành có thể cài đặt cho VPS (Windows, Linux, Ubuntu, Debian, CentOS, AlmaLinux...).

GET https://dichvudark.vip/api/vps-gold/os?key_app={key_app}&token={token}
curl -X GET "https://dichvudark.vip/api/vps-gold/os?key_app=YOUR_KEY_APP&token=YOUR_TOKEN"
GET

Giá Addon

Lấy bảng giá addon CPU, RAM, Disk để nâng cấp cấu hình VPS.

GET https://dichvudark.vip/api/vps-gold/addon?key_app={key_app}&token={token}
curl -X GET "https://dichvudark.vip/api/vps-gold/addon?key_app=YOUR_KEY_APP&token=YOUR_TOKEN"
GET

Lịch sử VPS

Lấy danh sách VPS đã mua. Thêm tham số id để xem chi tiết một VPS cụ thể.

GET https://dichvudark.vip/api/vps-gold/history?key_app={key_app}&token={token}&id={id}
curl -X GET "https://dichvudark.vip/api/vps-gold/history?key_app=YOUR_KEY_APP&token=YOUR_TOKEN"
POST

Mua VPS

Mua gói VPS Cloud. Hệ thống tự động hoàn tiền nếu tạo VPS thất bại.

POST https://dichvudark.vip/api/vps-gold/buy
TênLoạiMô tả
key_appBắt buộcAPI Key App
tokenBắt buộcAPI Token
vpsIdBắt buộcID gói VPS
osBắt buộcID hệ điều hành
billingcycleBắt buộcChu kỳ thanh toán
cpu, ram, diskTuỳ chọnSố addon thêm
curl -X POST "https://dichvudark.vip/api/vps-gold/buy" \ -d "key_app=YOUR_KEY_APP" \ -d "token=YOUR_TOKEN" \ -d "vpsId=1" -d "os=101" -d "billingcycle=monthly"
POST

Thao tác VPS (Action Controller)

Thực hiện mọi thao tác điều khiển VPS qua một endpoint duy nhất: Bật/Tắt, Khởi động lại, Cài lại OS, Gia hạn, Hủy & hoàn tiền, Đổi chip Platinum, Bật/Tắt VT, Nâng cấp, Đồng bộ ổ cứng, Đổi IP.

POST https://dichvudark.vip/api/vps-gold/action
TênLoạiMô tả
key_appBắt buộcAPI Key App
tokenBắt buộcAPI Token
paramBắt buộcID đơn hàng VPS (hoặc vps_id)
actionBắt buộcMã thao tác (Xem bảng chi tiết bên dưới)
Action CodeTên AliasMô tảTham số kèm theo
1start, onBật nguồn VPS—
2stop, offTắt nguồn VPS—
3restartKhởi động lại VPS—
4rebuildCài lại hệ điều hànhos_id (Bắt buộc)
5renewGia hạn VPS— (Trừ theo giá gói)
6cancelHủy VPS & hoàn tiền 80%Chỉ áp dụng trong 24h kể từ khi mua
7platinumĐổi chip CPU sang Intel Platinum—
8vt_onBật ảo hóa phần cứng (VT)—
9vt_offTắt ảo hóa phần cứng (VT)—
10upgradeNâng cấp cấu hìnhcpu, ram, disk
11extend_diskĐồng bộ ổ cứng sau nâng cấppassword (Mật khẩu VPS)
12change_ipĐổi địa chỉ IPv4 mớipassword (VPS phải đang BẬT)
curl -X POST "https://dichvudark.vip/api/vps-gold/action" \ -d "key_app=YOUR_KEY_APP" -d "token=YOUR_TOKEN" \ -d "param=5" -d "action=3"
curl -X POST "https://dichvudark.vip/api/vps-gold/action" \ -d "key_app=YOUR_KEY_APP" -d "token=YOUR_TOKEN" \ -d "param=5" -d "action=cancel"
POST

Hủy & Hoàn tiền VPS (Chỉ trong 24h)

Hủy đơn hàng VPS và tự động hoàn trả 80% số tiền đã mua vào tài khoản. Chỉ áp dụng cho VPS mua chưa quá 24 giờ.

POST https://dichvudark.vip/api/vps-gold/cancel
TênLoạiMô tả
key_appBắt buộcAPI Key App
tokenBắt buộcAPI Token
param (hoặc id)Bắt buộcID đơn hàng VPS cần hủy
curl -X POST "https://dichvudark.vip/api/vps-gold/cancel" \ -d "key_app=YOUR_KEY_APP" \ -d "token=YOUR_TOKEN" \ -d "param=5"
{
    "status": "success",
    "msg": "Hủy VPS thành công, đã hoàn trả 80% số tiền (120,000đ) vào tài khoản!",
    "refund_amount": 120000,
    "original_price": 150000
}
POST

Đổi Chip Intel Platinum

Chuyển đổi CPU VPS sang cụm xử lý dòng Intel Platinum hiệu năng cao.

POST https://dichvudark.vip/api/vps-gold/platinum
TênLoạiMô tả
key_appBắt buộcAPI Key App
tokenBắt buộcAPI Token
param (hoặc id)Bắt buộcID đơn hàng VPS
curl -X POST "https://dichvudark.vip/api/vps-gold/platinum" \ -d "key_app=YOUR_KEY_APP" \ -d "token=YOUR_TOKEN" \ -d "param=5"
{
    "status": "success",
    "msg": "Đang xử lý cấu hình Chip Platinum...",
    "ip": "103.x.x.x"
}
POST

Bật / Tắt Ảo hóa VT (Hardware Virtualization)

Kích hoạt hoặc vô hiệu hóa công nghệ ảo hóa Intel VT-x/AMD-V trên máy chủ ảo (phù hợp chạy giả lập Nox, LDPlayer, Docker, WSL...).

POST https://dichvudark.vip/api/vps-gold/vt
TênLoạiMô tả
key_appBắt buộcAPI Key App
tokenBắt buộcAPI Token
param (hoặc id)Bắt buộcID đơn hàng VPS
action (hoặc type)Bắt buộcon (Bật VT) hoặc off (Tắt VT)
curl -X POST "https://dichvudark.vip/api/vps-gold/vt" \ -d "key_app=YOUR_KEY_APP" \ -d "token=YOUR_TOKEN" \ -d "param=5" \ -d "action=on"
{
    "status": "success",
    "msg": "Đang tiến hành Bật VT...",
    "action": "on",
    "label": "Bật VT"
}
POST

Đồng bộ ổ cứng (Extend Disk)

Mở rộng và đồng bộ phân vùng ổ đĩa trong hệ điều hành VPS sau khi bạn nâng cấp thêm dung lượng SSD NVMe.

POST https://dichvudark.vip/api/vps-gold/extend-disk
TênLoạiMô tả
key_appBắt buộcAPI Key App
tokenBắt buộcAPI Token
param (hoặc id)Bắt buộcID đơn hàng VPS
passwordBắt buộcMật khẩu hiện tại của VPS
usernameTuỳ chọnTên tài khoản VPS (mặc định: root)
curl -X POST "https://dichvudark.vip/api/vps-gold/extend-disk" \ -d "key_app=YOUR_KEY_APP" \ -d "token=YOUR_TOKEN" \ -d "param=5" \ -d "password=YourVpsPassword123"
{
    "status": "success",
    "msg": "Đồng bộ ổ cứng VPS thành công!"
}
POST

Đổi địa chỉ IP VPS

Yêu cầu đổi địa chỉ IPv4 mới cho VPS. Yêu cầu VPS phải đang ở trạng thái BẬT (ON). Phí đổi IP sẽ được tự động trừ từ số dư tài khoản (nếu hệ thống có thiết lập).

POST https://dichvudark.vip/api/vps-gold/change-ip
TênLoạiMô tả
key_appBắt buộcAPI Key App
tokenBắt buộcAPI Token
param (hoặc id)Bắt buộcID đơn hàng VPS
passwordBắt buộcMật khẩu hiện tại của VPS
curl -X POST "https://dichvudark.vip/api/vps-gold/change-ip" \ -d "key_app=YOUR_KEY_APP" \ -d "token=YOUR_TOKEN" \ -d "param=5" \ -d "password=YourVpsPassword123"
{
    "status": "success",
    "msg": "Yêu cầu đổi IP đã được tiếp nhận, hệ thống sẽ xử lý trong thời gian sớm nhất!",
    "fee": 0,
    "vps_id": 7501
}

Tổng quan API Agency

Tất cả API trả về JSON. Mã error: 0 = thành công, error: 1 = lỗi.

Tải tài liệu (.md)
{
    "error": 0,
    "message": "Thành công",
    "data": { ... }
}

Danh sách Endpoints

MethodEndpointMô tả
POSTget-tokenLấy auth token
GETget-infoThông tin tài khoản & số dư
GETget-productDanh sách sản phẩm VPS
GETget-list-osDanh sách hệ điều hành
GETget-list-billing-cycleChu kỳ thanh toán
POSTorder/create-orderTạo đơn hàng VPS
POSTvps/action-vpsThao tác VPS
GETvps/get-list-vpsDanh sách VPS
GETvps/get-info-vpsChi tiết VPS
GETvps/history-action-vpsLịch sử thao tác VPS

Headers yêu cầu (cho mọi endpoint trừ get-token)

HeaderMô tảVí dụ
api-usernameTên tài khoản APIuser_1_abc123
api-appKey ứng dụngvps_def456...
api-secretMã bí mậtsec_8f2...
auth-tokenToken từ get-tokentk_921...
POST

get-token

Lấy Auth Token. Trừ endpoint này, tất cả request khác đều cần gửi kèm 4 headers.

POST https://dichvudark.vip/api/agency/get-token
TênLoạiMô tả
api-usernameBắt buộcUsername API
api-appBắt buộcKey App
api-secretBắt buộcSecret key
curl -X POST "https://dichvudark.vip/api/agency/get-token" \ -H "Content-Type: application/json" \ -d '{"api-username":"YOUR_USERNAME","api-app":"YOUR_APP","api-secret":"YOUR_SECRET"}'
{"error": 0, "auth-token": "a1b2c3d4e5f6..."}

Mẹo: Sau khi có token, gửi kèm 4 headers cho mọi request tiếp theo:

curl "https://dichvudark.vip/api/agency/get-info" \ -H "api-username: YOUR_USERNAME" \ -H "api-app: YOUR_APP" \ -H "api-secret: YOUR_SECRET" \ -H "auth-token: YOUR_TOKEN"
GET

get-info

Lấy thông tin tài khoản đại lý: tên, số dư, tổng chi tiêu, thống kê VPS.

GET https://dichvudark.vip/api/agency/get-info
{
    "error": 0,
    "message": "Lấy thông tin chi tiết đại lý thành công",
    "data": {
        "agency_name": "username",
        "total_service": 5,
        "credit": 500000,
        "total_expenses": 1200000,
        "service": {
            "vps": { "on": 3, "expire": 1, "total": 5 }
        }
    }
}
GET

get-product

Danh sách gói VPS và addon có sẵn, kèm giá theo từng chu kỳ.

GET https://dichvudark.vip/api/agency/get-product
{
    "error": 0,
    "products": {
        "vps": [{
            "group_product_name": "Cloud Server",
            "product": [{
                "product_id": 1, "name": "VPS  1",
                "cpu": "2 vCPU", "ram": "2GB", "disk": "20GB",
                "pricing": {
                    "monthly": {"billing_cycle": "1 Tháng", "amount": 150000}
                }
            }],
            "limit-os": [{"os-id": 101, "os-name": "Ubuntu 22.04"}]
        }],
        "addon_vps": [{
            "group_product_name": "Addon Cloud Server",
            "product": [
                {"product_id": 1, "name": "Addon CPU", "type_addon": "addon_cpu"}
            ]
        }]
    }
}
GET

get-list-os

Danh sách hệ điều hành hỗ trợ cài đặt.

GET https://dichvudark.vip/api/agency/get-list-os
{
    "error": 0,
    "os-vps": [
        {"os-id": 101, "os-name": "Ubuntu 22.04"},
        {"os-id": 102, "os-name": "Windows Server 2022"}
    ]
}
GET

get-list-billing-cycle

Các chu kỳ thanh toán cho phép.

GET https://dichvudark.vip/api/agency/get-list-billing-cycle
{
    "error": 0,
    "data": [
        {"cycle": "monthly", "name": "1 Tháng"},
        {"cycle": "quarterly", "name": "3 Tháng"},
        {"cycle": "semi_annually", "name": "6 Tháng"},
        {"cycle": "annually", "name": "1 Năm"}
    ]
}
POST

order/create-order

Tạo đơn hàng VPS mới. Số tiền tự động trừ từ số dư. Nếu thất bại sẽ hoàn lại tự động.

POST https://dichvudark.vip/api/agency/order/create-order
Tham sốLoạiMô tả
product-idBắt buộcID sản phẩm từ get-product
billing-cycleBắt buộcmonthly, quarterly, semi_annually, annually
osTuỳ chọnID hệ điều hành từ get-list-os
addon-cpuTuỳ chọnSố core CPU thêm
addon-ramTuỳ chọnSố GB RAM thêm
addon-diskTuỳ chọnDung lượng SSD thêm (bội số 10)
curl -X POST "https://dichvudark.vip/api/agency/order/create-order" \ -H "Content-Type: application/json" \ -H "api-username: YOUR_USERNAME" \ -H "api-app: YOUR_APP" \ -H "api-secret: YOUR_SECRET" \ -H "auth-token: YOUR_TOKEN" \ -d '{"product-id":1,"billing-cycle":"monthly","os":101,"addon-cpu":0,"addon-ram":0,"addon-disk":0}'
{
    "error": 0,
    "message": "Đặt hàng thành công",
    "credit": 260000,
    "total": 240000,
    "data": [{
        "vps-id": 7501,
        "ip": "103.x.x.x",
        "username": "root",
        "password": "LfAzcZbeXAHYleZk",
        "vps-status": "progressing"
    }],
    "local_order_id": "26"
}
POST

vps/action-vps

Thực hiện các thao tác điều khiển vòng đời và tính năng nâng cao trên Cloud VPS dành cho đại lý.

POST https://dichvudark.vip/api/agency/vps/action-vps
ActionMô tảTham số kèm theo (JSON)
start, onBật nguồn VPS—
off, stopTắt nguồn VPS—
restartKhởi động lại VPS—
rebuildCài lại OS (xoá toàn bộ dữ liệu)"os": 101
reinstallCài lại OS (giữ lại cấu hình)"os": 101
renew-vpsGia hạn gói VPS— (Trừ số dư đại lý)
addon-vpsNâng cấp cấu hình vCPU / RAM / SSDaddon-cpu, addon-ram, addon-disk
cancelHủy VPS & Hoàn tiền 80% (trong vòng 24h)—
platinumĐổi chip CPU sang Intel Platinum—
enable-vtBật công nghệ ảo hóa phần cứng (VT)—
disable-vtTắt công nghệ ảo hóa phần cứng (VT)—
extend-diskĐồng bộ dung lượng ổ cứng sau nâng cấp"password": "mật_khẩu_vps", tùy chọn "username"
change-ipĐổi địa chỉ IPv4 mới cho VPS"password": "mật_khẩu_vps" (VPS phải đang BẬT)
curl -X POST "https://dichvudark.vip/api/agency/vps/action-vps" \ -H "Content-Type: application/json" \ -H "api-username: YOUR_USERNAME" \ -H "api-app: YOUR_APP" \ -H "api-secret: YOUR_SECRET" \ -H "auth-token: YOUR_TOKEN" \ -d '{"vps-id":7501,"action":"cancel"}'
curl -X POST "https://dichvudark.vip/api/agency/vps/action-vps" \ -H "Content-Type: application/json" \ -H "api-username: YOUR_USERNAME" \ -H "api-app: YOUR_APP" \ -H "api-secret: YOUR_SECRET" \ -H "auth-token: YOUR_TOKEN" \ -d '{"vps-id":7501,"action":"platinum"}'
curl -X POST "https://dichvudark.vip/api/agency/vps/action-vps" \ -H "Content-Type: application/json" \ -H "api-username: YOUR_USERNAME" \ -H "api-app: YOUR_APP" \ -H "api-secret: YOUR_SECRET" \ -H "auth-token: YOUR_TOKEN" \ -d '{"vps-id":7501,"action":"enable-vt"}'
curl -X POST "https://dichvudark.vip/api/agency/vps/action-vps" \ -H "Content-Type: application/json" \ -H "api-username: YOUR_USERNAME" \ -H "api-app: YOUR_APP" \ -H "api-secret: YOUR_SECRET" \ -H "auth-token: YOUR_TOKEN" \ -d '{"vps-id":7501,"action":"extend-disk","password":"YourPassword123"}'
curl -X POST "https://dichvudark.vip/api/agency/vps/action-vps" \ -H "Content-Type: application/json" \ -H "api-username: YOUR_USERNAME" \ -H "api-app: YOUR_APP" \ -H "api-secret: YOUR_SECRET" \ -H "auth-token: YOUR_TOKEN" \ -d '{"vps-id":7501,"action":"change-ip","password":"YourPassword123"}'
{"error": 0, "message": "Thao tác thành công"}
GET

vps/get-list-vps

Lấy danh sách tất cả VPS đang sở hữu.

GET https://dichvudark.vip/api/agency/vps/get-list-vps
{
    "error": 0,
    "message": "Lấy danh sách VPS thành công",
    "list-service": [{
        "vps-id": 7501,
        "ip": "103.x.x.x",
        "cpu": 3, "ram": 3, "disk": 30,
        "text-config": "3 CPU - 3 RAM - 30 Disk",
        "day-left": "Còn hạn 30 ngày",
        "vps-status": "on",
        "username": "root",
        "password": "xxx"
    }]
}
GET

vps/get-info-vps

Xem thông tin chi tiết một VPS cụ thể.

GET https://dichvudark.vip/api/agency/vps/get-info-vps?vps-id={vps-id}
Query ParamLoạiMô tả
vps-idBắt buộcID của VPS cần xem
{
    "error": 0,
    "message": "Yêu cầu đến VPS thành công",
    "data": [{
        "vps-id": 7501,
        "ip": "103.x.x.x",
        "cpu": 3, "ram": 3, "disk": 30,
        "vps-status": "on",
        "username": "root",
        "password": "xxx",
        "next_due_date": "07-04-2026"
    }]
}
GET

vps/history-action-vps

Xem lịch sử thao tác đã thực hiện trên VPS.

GET https://dichvudark.vip/api/agency/vps/history-action-vps?vps-id={vps-id}
Query ParamLoạiMô tả
vps-idBắt buộcID của VPS cần xem lịch sử
ERR

Mã lỗi thường gặp

Error MessageNguyên nhân & Cách xử lý
Thiếu các header xác thực bắt buộcRequest thiếu header: api-username, api-app, api-secret, auth-token
Invalid credentialsSai username, app hoặc secret key
Auth Token không hợp lệToken sai. Gọi lại get-token
Thiếu trường bắt buộc: ...Body JSON thiếu product-id, billing-cycle, ...
Hành động không hợp lệAction không nằm trong: start, off, restart, rebuild, reinstall
Số dư không đủ...Tài khoản không đủ tiền. Nạp thêm trước khi đặt hàng
Sản phẩm không tồn tạiID sản phẩm sai. Lấy từ get-product
Không tìm thấy thông tin VPS...VPS ID không tồn tại hoặc không thuộc quyền sở hữu
Đã sao chép!