เมนูเอกสาร: XVer API
REST v2 อัปเดต

XVer API Reference

เอกสารอ้างอิงทุก endpoint ของ XVer API v2 จากสัญญา OpenAPI 3.1.0 พร้อมตัวอย่างโค้ดและทดลองยิง API จริง

ภาษาตัวอย่างโค้ด
เก็บไว้ใน sessionStorage ของเบราว์เซอร์นี้เท่านั้น ไม่ถูกส่งจนกว่าจะกดส่งคำขอhttps://api.xver.cloud/v2 · OpenAPI 2.0.0-draft.3

แคตตาล็อกและราคา

ดูแพ็กเกจ Cloud Server, OS image และอัตราค่าบริการล่าสุด (ไม่ต้องใช้สิทธิ์พิเศษ)

GET/imagesPublic

List the operating systems a server can be created with

พารามิเตอร์

limitqueryinteger (int64)default: 25

min: 1 · max: 100

cursorquerystring

next_cursor of the page before. Do not build or parse it.

maxLen: 512

คำตอบ (Responses)

200 OK · ImageList

dataImage[]จำเป็น
min_memory_gbinteger (int64)จำเป็น
min_vcpuinteger (int64)จำเป็น
namestringจำเป็น
osstringจำเป็น

pattern: ^[a-z0-9][a-z0-9-]{0,63}$

slugstringจำเป็น

pattern: ^[a-z0-9][a-z0-9-]{0,63}$

ssh_key_supportedboolean
versionstringจำเป็น
next_cursorstring | nullจำเป็น
curl -s -X GET "https://api.xver.cloud/v2/images"
ตัวอย่างคำตอบ (200)
{
  "data": [
    {
      "min_memory_gb": 8,
      "min_vcpu": 2,
      "name": "web-01",
      "os": "string",
      "slug": "string",
      "ssh_key_supported": false,
      "version": "string"
    }
  ],
  "next_cursor": "eyJpZCI6IjAxOTVjMWU0In0"
}
GET/plansPublic

List Cloud Server plans and prices

พารามิเตอร์

categoryquerystring
limitqueryinteger (int64)default: 25

min: 1 · max: 100

cursorquerystring

next_cursor of the page before. Do not build or parse it.

maxLen: 512

คำตอบ (Responses)

200 OK · PlanList

dataPlan[]จำเป็น
availablebooleanจำเป็น
bandwidth_tbinteger (int64)จำเป็น
categorystringจำเป็น
sharedgeneraldedicated
disk_gbinteger (int64)จำเป็น
memory_mbinteger (int64)จำเป็น
pricePriceจำเป็น
currencystringจำเป็น
hourlystringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

monthly_maxstringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

slugstringจำเป็น

pattern: ^[a-z0-9][a-z0-9-]{0,63}$

vcpuinteger (int64)จำเป็น
next_cursorstring | nullจำเป็น
curl -s -X GET "https://api.xver.cloud/v2/plans"
ตัวอย่างคำตอบ (200)
{
  "data": [
    {
      "available": false,
      "bandwidth_tb": 1,
      "category": "shared",
      "disk_gb": 80,
      "memory_mb": 8,
      "price": {
        "currency": "THB",
        "hourly": "string",
        "monthly_max": "string"
      },
      "slug": "string",
      "vcpu": 2
    }
  ],
  "next_cursor": "eyJpZCI6IjAxOTVjMWU0In0"
}
GET/pricingPublic

Get the prices of extra disk, block storage, backups and bandwidth

คำตอบ (Responses)

200 OK · Pricing

backup_gb_hourstringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

bandwidth_overage_gbstringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

block_storage_gb_monthstringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

currencystringจำเป็น
disk_addition_gb_monthstringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

disk_addition_max_gbinteger (int64)
curl -s -X GET "https://api.xver.cloud/v2/pricing"
ตัวอย่างคำตอบ (200)
{
  "backup_gb_hour": "string",
  "bandwidth_overage_gb": "string",
  "block_storage_gb_month": "string",
  "currency": "THB",
  "disk_addition_gb_month": "string",
  "disk_addition_max_gb": 80
}

API Token

ตรวจสอบข้อมูลของ token ที่กำลังใช้งานอยู่ หรือเพิกถอน token ของตัวเอง

GET/tokenPublic

Get the token of this request

Other tokens cannot be seen.

คำตอบ (Responses)

200 OK · Token

created_atstring (date-time)จำเป็น
display_prefixstringจำเป็น
expires_atstring (date-time)จำเป็น
idstring (uuid)จำเป็น
kindstringจำเป็น
personalcli
last_used_atstring (date-time) | null
namestringจำเป็น

maxLen: 64

project_idsstring[]จำเป็น

The projects the token was made for. Access to each depends on being a member of it now.

scopesstring[]จำเป็น
curl -s -X GET "https://api.xver.cloud/v2/token" \
  -H "Authorization: Bearer $XVER_TOKEN"
ตัวอย่างคำตอบ (200)
{
  "created_at": "2026-11-28T09:00:00Z",
  "display_prefix": "string",
  "expires_at": "2026-11-28T09:00:00Z",
  "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
  "kind": "personal",
  "last_used_at": "2026-11-28T09:00:00Z",
  "name": "web-01",
  "project_ids": [
    "0195c1e4-7b3a-7d12-8a4f-000000000001"
  ],
  "scopes": [
    "servers:read"
  ]
}
DELETE/tokenPublic

Revoke the token of this request

คำตอบ (Responses)

204 No Content

curl -s -X DELETE "https://api.xver.cloud/v2/token" \
  -H "Authorization: Bearer $XVER_TOKEN"

โปรเจกต์

ดูรายการและรายละเอียดโปรเจกต์ที่ token นี้เข้าถึงได้

GET/projectsScope: projects:read

List the projects the token reaches now

พารามิเตอร์

limitqueryinteger (int64)default: 25

min: 1 · max: 100

cursorquerystring

next_cursor of the page before. Do not build or parse it.

maxLen: 512

คำตอบ (Responses)

200 OK · ProjectList

dataProject[]จำเป็น
accessProjectAccessจำเป็น

What this token may do in the project now.

backupsstringจำเป็น
nonereadmanagedelete
serversstringจำเป็น
nonereadmanagedelete
servers_passwordbooleanจำเป็น
volumesstringจำเป็น
nonereadmanagedelete
created_atstring (date-time)
idstring (uuid)จำเป็น
is_defaultbooleanจำเป็น
namestringจำเป็น
rolestringจำเป็น
owneradminmember
next_cursorstring | nullจำเป็น
curl -s -X GET "https://api.xver.cloud/v2/projects" \
  -H "Authorization: Bearer $XVER_TOKEN"
ตัวอย่างคำตอบ (200)
{
  "data": [
    {
      "access": {
        "backups": "none",
        "servers": "none",
        "servers_password": false,
        "volumes": "none"
      },
      "created_at": "2026-11-28T09:00:00Z",
      "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
      "is_default": false,
      "name": "web-01",
      "role": "owner"
    }
  ],
  "next_cursor": "eyJpZCI6IjAxOTVjMWU0In0"
}
GET/projects/{project_id}Scope: projects:read

Get a project

พารามิเตอร์

project_idpathstring (uuid)จำเป็น

คำตอบ (Responses)

200 OK · Project

accessProjectAccessจำเป็น

What this token may do in the project now.

backupsstringจำเป็น
nonereadmanagedelete
serversstringจำเป็น
nonereadmanagedelete
servers_passwordbooleanจำเป็น
volumesstringจำเป็น
nonereadmanagedelete
created_atstring (date-time)
idstring (uuid)จำเป็น
is_defaultbooleanจำเป็น
namestringจำเป็น
rolestringจำเป็น
owneradminmember
curl -s -X GET "https://api.xver.cloud/v2/projects/0195c1e4-7b3a-7d12-8a4f-000000000001" \
  -H "Authorization: Bearer $XVER_TOKEN"
ตัวอย่างคำตอบ (200)
{
  "access": {
    "backups": "none",
    "servers": "none",
    "servers_password": false,
    "volumes": "none"
  },
  "created_at": "2026-11-28T09:00:00Z",
  "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
  "is_default": false,
  "name": "web-01",
  "role": "owner"
}

Cloud Server

ดู สร้าง เปิด ปิด รีบูต เปลี่ยนชื่อ ปรับขนาด และจัดการนโยบายแบ็กอัปของเซิร์ฟเวอร์

GET/serversScope: servers:read

List the servers of a project, including those being installed

พารามิเตอร์

project_idquerystring (uuid)

May be left out when the token has one project; with more it is project_required.

limitqueryinteger (int64)default: 25

min: 1 · max: 100

cursorquerystring

next_cursor of the page before. Do not build or parse it.

maxLen: 512

คำตอบ (Responses)

200 OK · ServerList

dataServer[]จำเป็น
accessstringจำเป็น
nonereadmanagedelete
agentServerAgentจำเป็น
last_seen_atstring (date-time) | nullจำเป็น
onlinebooleanจำเป็น
statestringจำเป็น
nonependingactivequarantined
versionstring | nullจำเป็น
created_atstring (date-time)จำเป็น
disk_gbinteger (int64)จำเป็น
has_passwordbooleanจำเป็น

false when it is entered with an SSH key

hostnamestringจำเป็น
idstring (uuid)จำเป็น
imagestringจำเป็น
ipv4string (ipv4) | nullจำเป็น
memory_mbinteger (int64)จำเป็น
planstring | nullจำเป็น

null for a server of the plans before the ones on sale now

pricePriceจำเป็น
currencystringจำเป็น
hourlystringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

monthly_maxstringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

private_ipv4string (ipv4) | null
project_idstring (uuid)จำเป็น
statusstringจำเป็น
provisioningrunningstoppedstartingstoppingrebootingresizingbacking_uprestoringdeletingsuspendederrorunknown
tagsstring[]
termination_protectionbooleanจำเป็น

true: it cannot be deleted or restored over

usernamestring
vcpuinteger (int64)จำเป็น
next_cursorstring | nullจำเป็น
curl -s -X GET "https://api.xver.cloud/v2/servers" \
  -H "Authorization: Bearer $XVER_TOKEN"
ตัวอย่างคำตอบ (200)
{
  "data": [
    {
      "access": "none",
      "agent": {
        "last_seen_at": "2026-11-28T09:00:00Z",
        "online": false,
        "state": "none",
        "version": "string"
      },
      "created_at": "2026-11-28T09:00:00Z",
      "disk_gb": 80,
      "has_password": false,
      "hostname": "web-01",
      "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
      "image": "ubuntu-24-04-lts",
      "ipv4": "203.0.113.10",
      "memory_mb": 8,
      "plan": "g-2vcpu-8gb",
      "price": {
        "currency": "THB",
        "hourly": "string",
        "monthly_max": "string"
      },
      "private_ipv4": "string",
      "project_id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
      "status": "provisioning",
      "tags": [
        "string"
      ],
      "termination_protection": false,
      "username": "string",
      "vcpu": 2
    }
  ],
  "next_cursor": "eyJpZCI6IjAxOTVjMWU0In0"
}
POST/serversScope: servers:manage

Create one server (an operation)

The operation succeeds when the server is active, which is before it restarts once by itself and before the XVer agent is ready.

พารามิเตอร์

Idempotency-Keyheaderstring

Random, such as a UUID. Needed by every request that starts work, not by a dry run. The same key with the same request gets the same answer for 24 hours; with another request it is idempotency_mismatch.

minLen: 16 · maxLen: 100 · pattern: ^[A-Za-z0-9_-]+$

dry_runquerybooleandefault: false

Check every rule and give the price, changing nothing.

Request Body (JSON) · CreateServerRequest

agentbooleandefault: true

Install the XVer agent where the operating system supports it.

backup_enabledbooleandefault: false
disk_addition_gbinteger (int64)default: 0

min: 0 · max: 512

exclude_private_ipv4booleandefault: false

Create the server without a private IPv4. Not with exclude_public_ipv4.

exclude_public_ipv4booleandefault: false

Create the server without a public IPv4. It is then offline: no internet, reachable from the private network and the console. Not with exclude_private_ipv4.

hostnamestringจำเป็น

pattern: ^[a-zA-Z0-9_-]{4,20}$

imagestringจำเป็น

pattern: ^[a-z0-9][a-z0-9-]{0,63}$

planstringจำเป็น

pattern: ^[a-z0-9][a-z0-9-]{0,63}$

project_idstring (uuid)จำเป็น
ssh_key_idsstring[]
startup_scriptstring

Runs as root on the new server. Never returned.

maxLen: 16384

tagsstring[]
termination_protectionbooleandefault: false

คำตอบ (Responses)

200 OK · DryRun

blockersBlocker[]จำเป็น
codestringจำเป็น
invalid_requestinvalid_cursorproject_requiredidempotency_key_requiredunauthenticatedtoken_invalidtoken_expiredtoken_revokedinsufficient_creditspend_blockedtermination_protection_web_onlyaccount_suspendedemail_not_verifiedkyc_requiredowner_ineligibleinsufficient_scopeproject_access_deniedpassword_access_deniedtoken_not_allowedresource_not_foundproject_not_foundoperation_not_foundnot_foundmethod_not_allowedinstall_in_progressresource_busyrename_cooldowntermination_protectedserver_not_readyserver_has_no_passwordvolume_attachedproject_mismatchproject_changedbackup_not_enabledbackup_not_restorablebackup_in_progressresize_not_allowedssh_key_duplicateidempotency_in_progresspayload_too_largevalidation_failedidempotency_mismatchquota_exceededssh_key_limitblock_volume_limitblock_volume_too_largeblock_storage_quota_exceededplan_unavailableimage_unavailableimage_requirement_not_metssh_key_not_supportedrate_limitedinternal_errorupstream_failedoutcome_unknowncapacity_unavailableservice_pausedmaintenance
detailstringจำเป็น
can_executebooleanจำเป็น
destructivebooleanจำเป็น

true when data would be lost or overwritten

dry_runbooleanจำเป็น
true
previous_priceany
priceanyจำเป็น

The whole price after the request, null when it does not change.

price_notesstring[]
warningsstring[]จำเป็น
curl -s -X POST "https://api.xver.cloud/v2/servers" \
  -H "Authorization: Bearer $XVER_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "agent": true,
  "backup_enabled": false,
  "disk_addition_gb": 0,
  "exclude_private_ipv4": false,
  "exclude_public_ipv4": false,
  "hostname": "web-01",
  "image": "ubuntu-24-04-lts",
  "plan": "g-2vcpu-8gb",
  "project_id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
  "ssh_key_ids": [
    "0195c1e4-7b3a-7d12-8a4f-000000000001"
  ],
  "startup_script": "string",
  "tags": [
    "string"
  ],
  "termination_protection": false
}'
ตัวอย่างคำตอบ (200)
{
  "blockers": [
    {
      "code": "invalid_request",
      "detail": "string"
    }
  ],
  "can_execute": false,
  "destructive": false,
  "dry_run": false,
  "previous_price": null,
  "price": null,
  "price_notes": [
    "1.220000"
  ],
  "warnings": [
    "string"
  ]
}
GET/servers/{server_id}Scope: servers:read

Get a server

พารามิเตอร์

server_idpathstring (uuid)จำเป็น

คำตอบ (Responses)

200 OK · Server

accessstringจำเป็น
nonereadmanagedelete
agentServerAgentจำเป็น
last_seen_atstring (date-time) | nullจำเป็น
onlinebooleanจำเป็น
statestringจำเป็น
nonependingactivequarantined
versionstring | nullจำเป็น
created_atstring (date-time)จำเป็น
disk_gbinteger (int64)จำเป็น
has_passwordbooleanจำเป็น

false when it is entered with an SSH key

hostnamestringจำเป็น
idstring (uuid)จำเป็น
imagestringจำเป็น
ipv4string (ipv4) | nullจำเป็น
memory_mbinteger (int64)จำเป็น
planstring | nullจำเป็น

null for a server of the plans before the ones on sale now

pricePriceจำเป็น
currencystringจำเป็น
hourlystringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

monthly_maxstringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

private_ipv4string (ipv4) | null
project_idstring (uuid)จำเป็น
statusstringจำเป็น
provisioningrunningstoppedstartingstoppingrebootingresizingbacking_uprestoringdeletingsuspendederrorunknown
tagsstring[]
termination_protectionbooleanจำเป็น

true: it cannot be deleted or restored over

usernamestring
vcpuinteger (int64)จำเป็น
curl -s -X GET "https://api.xver.cloud/v2/servers/0195c1e4-7b3a-7d12-8a4f-000000000001" \
  -H "Authorization: Bearer $XVER_TOKEN"
ตัวอย่างคำตอบ (200)
{
  "access": "none",
  "agent": {
    "last_seen_at": "2026-11-28T09:00:00Z",
    "online": false,
    "state": "none",
    "version": "string"
  },
  "created_at": "2026-11-28T09:00:00Z",
  "disk_gb": 80,
  "has_password": false,
  "hostname": "web-01",
  "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
  "image": "ubuntu-24-04-lts",
  "ipv4": "203.0.113.10",
  "memory_mb": 8,
  "plan": "g-2vcpu-8gb",
  "price": {
    "currency": "THB",
    "hourly": "string",
    "monthly_max": "string"
  },
  "private_ipv4": "string",
  "project_id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
  "status": "provisioning",
  "tags": [
    "string"
  ],
  "termination_protection": false,
  "username": "string",
  "vcpu": 2
}
PATCH/servers/{server_id}Scope: servers:manage

Rename a server or turn on its deletion protection

One field at a time. termination_protection false is always termination_protection_web_only: deletion protection is turned off by hand on the server page in the console.

พารามิเตอร์

server_idpathstring (uuid)จำเป็น

Request Body (JSON)

hostnamestring

pattern: ^[a-zA-Z0-9_-]{4,20}$

termination_protectionboolean

Only true is taken. Deletion protection is turned off by hand on the server page in the console.

คำตอบ (Responses)

200 OK · Server

accessstringจำเป็น
nonereadmanagedelete
agentServerAgentจำเป็น
last_seen_atstring (date-time) | nullจำเป็น
onlinebooleanจำเป็น
statestringจำเป็น
nonependingactivequarantined
versionstring | nullจำเป็น
created_atstring (date-time)จำเป็น
disk_gbinteger (int64)จำเป็น
has_passwordbooleanจำเป็น

false when it is entered with an SSH key

hostnamestringจำเป็น
idstring (uuid)จำเป็น
imagestringจำเป็น
ipv4string (ipv4) | nullจำเป็น
memory_mbinteger (int64)จำเป็น
planstring | nullจำเป็น

null for a server of the plans before the ones on sale now

pricePriceจำเป็น
currencystringจำเป็น
hourlystringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

monthly_maxstringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

private_ipv4string (ipv4) | null
project_idstring (uuid)จำเป็น
statusstringจำเป็น
provisioningrunningstoppedstartingstoppingrebootingresizingbacking_uprestoringdeletingsuspendederrorunknown
tagsstring[]
termination_protectionbooleanจำเป็น

true: it cannot be deleted or restored over

usernamestring
vcpuinteger (int64)จำเป็น
curl -s -X PATCH "https://api.xver.cloud/v2/servers/0195c1e4-7b3a-7d12-8a4f-000000000001" \
  -H "Authorization: Bearer $XVER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "hostname": "web-01",
  "termination_protection": false
}'
ตัวอย่างคำตอบ (200)
{
  "access": "none",
  "agent": {
    "last_seen_at": "2026-11-28T09:00:00Z",
    "online": false,
    "state": "none",
    "version": "string"
  },
  "created_at": "2026-11-28T09:00:00Z",
  "disk_gb": 80,
  "has_password": false,
  "hostname": "web-01",
  "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
  "image": "ubuntu-24-04-lts",
  "ipv4": "203.0.113.10",
  "memory_mb": 8,
  "plan": "g-2vcpu-8gb",
  "price": {
    "currency": "THB",
    "hourly": "string",
    "monthly_max": "string"
  },
  "private_ipv4": "string",
  "project_id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
  "status": "provisioning",
  "tags": [
    "string"
  ],
  "termination_protection": false,
  "username": "string",
  "vcpu": 2
}
POST/servers/{server_id}/rebootScope: servers:manage

POST /servers/{server_id}/reboot

พารามิเตอร์

Idempotency-Keyheaderstring

Random, such as a UUID. Needed by every request that starts work, not by a dry run. The same key with the same request gets the same answer for 24 hours; with another request it is idempotency_mismatch.

minLen: 16 · maxLen: 100 · pattern: ^[A-Za-z0-9_-]+$

server_idpathstring (uuid)จำเป็น

คำตอบ (Responses)

202 Accepted · OperationEnvelope

Response Headers

Location (string) The operation.

operationOperationจำเป็น
created_atstring (date-time)จำเป็น
erroranyจำเป็น
finished_atstring (date-time) | nullจำเป็น
idstring (uuid)จำเป็น
kindstringจำเป็น

Clients must accept kinds they do not know.

server.createserver.deleteserver.startserver.shutdownserver.rebootserver.resizevolume.createvolume.resizevolume.attachvolume.detachvolume.deletebackup.createbackup.deletebackup.restore
originstringจำเป็น
webtokenxverctlmcpchatbotcloud_shellsystem
project_idstring (uuid)จำเป็น
resourceOperationResourceจำเป็น
idstring (uuid)จำเป็น
namestring
typestringจำเป็น
servervolumebackup
started_atstring (date-time) | null
statusstringจำเป็น
pendingrunningsucceededfailed
curl -s -X POST "https://api.xver.cloud/v2/servers/0195c1e4-7b3a-7d12-8a4f-000000000001/reboot" \
  -H "Authorization: Bearer $XVER_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"
ตัวอย่างคำตอบ (202)
{
  "operation": {
    "created_at": "2026-11-28T09:00:00Z",
    "error": null,
    "finished_at": "2026-11-28T09:00:00Z",
    "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
    "kind": "server.create",
    "origin": "web",
    "project_id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
    "resource": {
      "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
      "name": "web-01",
      "type": "server"
    },
    "started_at": "2026-11-28T09:00:00Z",
    "status": "pending"
  }
}
POST/servers/{server_id}/resizeScope: servers:manage

Resize a server up (it is shut down and started again)

พารามิเตอร์

Idempotency-Keyheaderstring

Random, such as a UUID. Needed by every request that starts work, not by a dry run. The same key with the same request gets the same answer for 24 hours; with another request it is idempotency_mismatch.

minLen: 16 · maxLen: 100 · pattern: ^[A-Za-z0-9_-]+$

server_idpathstring (uuid)จำเป็น
dry_runquerybooleandefault: false

Check every rule and give the price, changing nothing.

Request Body (JSON) · ResizeRequest

planstringจำเป็น

pattern: ^[a-z0-9][a-z0-9-]{0,63}$

คำตอบ (Responses)

200 OK · DryRun

blockersBlocker[]จำเป็น
codestringจำเป็น
invalid_requestinvalid_cursorproject_requiredidempotency_key_requiredunauthenticatedtoken_invalidtoken_expiredtoken_revokedinsufficient_creditspend_blockedtermination_protection_web_onlyaccount_suspendedemail_not_verifiedkyc_requiredowner_ineligibleinsufficient_scopeproject_access_deniedpassword_access_deniedtoken_not_allowedresource_not_foundproject_not_foundoperation_not_foundnot_foundmethod_not_allowedinstall_in_progressresource_busyrename_cooldowntermination_protectedserver_not_readyserver_has_no_passwordvolume_attachedproject_mismatchproject_changedbackup_not_enabledbackup_not_restorablebackup_in_progressresize_not_allowedssh_key_duplicateidempotency_in_progresspayload_too_largevalidation_failedidempotency_mismatchquota_exceededssh_key_limitblock_volume_limitblock_volume_too_largeblock_storage_quota_exceededplan_unavailableimage_unavailableimage_requirement_not_metssh_key_not_supportedrate_limitedinternal_errorupstream_failedoutcome_unknowncapacity_unavailableservice_pausedmaintenance
detailstringจำเป็น
can_executebooleanจำเป็น
destructivebooleanจำเป็น

true when data would be lost or overwritten

dry_runbooleanจำเป็น
true
previous_priceany
priceanyจำเป็น

The whole price after the request, null when it does not change.

price_notesstring[]
warningsstring[]จำเป็น
curl -s -X POST "https://api.xver.cloud/v2/servers/0195c1e4-7b3a-7d12-8a4f-000000000001/resize" \
  -H "Authorization: Bearer $XVER_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "plan": "g-2vcpu-8gb"
}'
ตัวอย่างคำตอบ (200)
{
  "blockers": [
    {
      "code": "invalid_request",
      "detail": "string"
    }
  ],
  "can_execute": false,
  "destructive": false,
  "dry_run": false,
  "previous_price": null,
  "price": null,
  "price_notes": [
    "1.220000"
  ],
  "warnings": [
    "string"
  ]
}
GET/servers/{server_id}/resize-optionsScope: servers:read

List the plans a server can be resized to; empty when it is on the largest

พารามิเตอร์

server_idpathstring (uuid)จำเป็น

คำตอบ (Responses)

200 OK · PlanList

dataPlan[]จำเป็น
availablebooleanจำเป็น
bandwidth_tbinteger (int64)จำเป็น
categorystringจำเป็น
sharedgeneraldedicated
disk_gbinteger (int64)จำเป็น
memory_mbinteger (int64)จำเป็น
pricePriceจำเป็น
currencystringจำเป็น
hourlystringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

monthly_maxstringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

slugstringจำเป็น

pattern: ^[a-z0-9][a-z0-9-]{0,63}$

vcpuinteger (int64)จำเป็น
next_cursorstring | nullจำเป็น
curl -s -X GET "https://api.xver.cloud/v2/servers/0195c1e4-7b3a-7d12-8a4f-000000000001/resize-options" \
  -H "Authorization: Bearer $XVER_TOKEN"
ตัวอย่างคำตอบ (200)
{
  "data": [
    {
      "available": false,
      "bandwidth_tb": 1,
      "category": "shared",
      "disk_gb": 80,
      "memory_mb": 8,
      "price": {
        "currency": "THB",
        "hourly": "string",
        "monthly_max": "string"
      },
      "slug": "string",
      "vcpu": 2
    }
  ],
  "next_cursor": "eyJpZCI6IjAxOTVjMWU0In0"
}
POST/servers/{server_id}/shutdownScope: servers:manage

POST /servers/{server_id}/shutdown

พารามิเตอร์

Idempotency-Keyheaderstring

Random, such as a UUID. Needed by every request that starts work, not by a dry run. The same key with the same request gets the same answer for 24 hours; with another request it is idempotency_mismatch.

minLen: 16 · maxLen: 100 · pattern: ^[A-Za-z0-9_-]+$

server_idpathstring (uuid)จำเป็น

คำตอบ (Responses)

202 Accepted · OperationEnvelope

Response Headers

Location (string) The operation.

operationOperationจำเป็น
created_atstring (date-time)จำเป็น
erroranyจำเป็น
finished_atstring (date-time) | nullจำเป็น
idstring (uuid)จำเป็น
kindstringจำเป็น

Clients must accept kinds they do not know.

server.createserver.deleteserver.startserver.shutdownserver.rebootserver.resizevolume.createvolume.resizevolume.attachvolume.detachvolume.deletebackup.createbackup.deletebackup.restore
originstringจำเป็น
webtokenxverctlmcpchatbotcloud_shellsystem
project_idstring (uuid)จำเป็น
resourceOperationResourceจำเป็น
idstring (uuid)จำเป็น
namestring
typestringจำเป็น
servervolumebackup
started_atstring (date-time) | null
statusstringจำเป็น
pendingrunningsucceededfailed
curl -s -X POST "https://api.xver.cloud/v2/servers/0195c1e4-7b3a-7d12-8a4f-000000000001/shutdown" \
  -H "Authorization: Bearer $XVER_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"
ตัวอย่างคำตอบ (202)
{
  "operation": {
    "created_at": "2026-11-28T09:00:00Z",
    "error": null,
    "finished_at": "2026-11-28T09:00:00Z",
    "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
    "kind": "server.create",
    "origin": "web",
    "project_id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
    "resource": {
      "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
      "name": "web-01",
      "type": "server"
    },
    "started_at": "2026-11-28T09:00:00Z",
    "status": "pending"
  }
}
POST/servers/{server_id}/startScope: servers:manage

POST /servers/{server_id}/start

พารามิเตอร์

Idempotency-Keyheaderstring

Random, such as a UUID. Needed by every request that starts work, not by a dry run. The same key with the same request gets the same answer for 24 hours; with another request it is idempotency_mismatch.

minLen: 16 · maxLen: 100 · pattern: ^[A-Za-z0-9_-]+$

server_idpathstring (uuid)จำเป็น

คำตอบ (Responses)

202 Accepted · OperationEnvelope

Response Headers

Location (string) The operation.

operationOperationจำเป็น
created_atstring (date-time)จำเป็น
erroranyจำเป็น
finished_atstring (date-time) | nullจำเป็น
idstring (uuid)จำเป็น
kindstringจำเป็น

Clients must accept kinds they do not know.

server.createserver.deleteserver.startserver.shutdownserver.rebootserver.resizevolume.createvolume.resizevolume.attachvolume.detachvolume.deletebackup.createbackup.deletebackup.restore
originstringจำเป็น
webtokenxverctlmcpchatbotcloud_shellsystem
project_idstring (uuid)จำเป็น
resourceOperationResourceจำเป็น
idstring (uuid)จำเป็น
namestring
typestringจำเป็น
servervolumebackup
started_atstring (date-time) | null
statusstringจำเป็น
pendingrunningsucceededfailed
curl -s -X POST "https://api.xver.cloud/v2/servers/0195c1e4-7b3a-7d12-8a4f-000000000001/start" \
  -H "Authorization: Bearer $XVER_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"
ตัวอย่างคำตอบ (202)
{
  "operation": {
    "created_at": "2026-11-28T09:00:00Z",
    "error": null,
    "finished_at": "2026-11-28T09:00:00Z",
    "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
    "kind": "server.create",
    "origin": "web",
    "project_id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
    "resource": {
      "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
      "name": "web-01",
      "type": "server"
    },
    "started_at": "2026-11-28T09:00:00Z",
    "status": "pending"
  }
}

แบ็กอัป

ดูรายละเอียดแบ็กอัปของเซิร์ฟเวอร์

GET/backups/{backup_id}Scope: backups:read

Get a backup

พารามิเตอร์

backup_idpathstring (uuid)จำเป็น

คำตอบ (Responses)

200 OK · Backup

created_atstring (date-time)จำเป็น
expires_atstring (date-time) | null
idstring (uuid)จำเป็น
kindstringจำเป็น
automatedmanual
namestringจำเป็น
priceanyจำเป็น
server_idstring (uuid)จำเป็น
size_bytesinteger (int64) | nullจำเป็น
statusstringจำเป็น
pendingsuccesserrordeleting
curl -s -X GET "https://api.xver.cloud/v2/backups/0195c1e4-7b3a-7d12-8a4f-000000000001" \
  -H "Authorization: Bearer $XVER_TOKEN"
ตัวอย่างคำตอบ (200)
{
  "created_at": "2026-11-28T09:00:00Z",
  "expires_at": "2026-11-28T09:00:00Z",
  "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
  "kind": "automated",
  "name": "web-01",
  "price": null,
  "server_id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
  "size_bytes": 80,
  "status": "pending"
}
GET/servers/{server_id}/backup-policyScope: backups:read

Get when a server is backed up

พารามิเตอร์

server_idpathstring (uuid)จำเป็น

คำตอบ (Responses)

200 OK · BackupPolicy

day_of_monthinteger (int64)

min: 1 · max: 31

enabledbooleanจำเป็น
every_hoursinteger (int64)

min: 1 · max: 24

frequencystring
dailyweeklymonthly
retention_countinteger (int64)

min: 1 · max: 365

retention_unitstring
dayweekmonthyear
starting_atstring (date-time)
weekdaysstring[]
curl -s -X GET "https://api.xver.cloud/v2/servers/0195c1e4-7b3a-7d12-8a4f-000000000001/backup-policy" \
  -H "Authorization: Bearer $XVER_TOKEN"
ตัวอย่างคำตอบ (200)
{
  "day_of_month": 1,
  "enabled": false,
  "every_hours": 1,
  "frequency": "daily",
  "retention_count": 1,
  "retention_unit": "day",
  "starting_at": "2026-11-28T09:00:00Z",
  "weekdays": [
    "mon"
  ]
}
GET/servers/{server_id}/backupsScope: backups:read

List the backups of a server

พารามิเตอร์

server_idpathstring (uuid)จำเป็น
limitqueryinteger (int64)default: 25

min: 1 · max: 100

cursorquerystring

next_cursor of the page before. Do not build or parse it.

maxLen: 512

คำตอบ (Responses)

200 OK · BackupList

dataBackup[]จำเป็น
created_atstring (date-time)จำเป็น
expires_atstring (date-time) | null
idstring (uuid)จำเป็น
kindstringจำเป็น
automatedmanual
namestringจำเป็น
priceanyจำเป็น
server_idstring (uuid)จำเป็น
size_bytesinteger (int64) | nullจำเป็น
statusstringจำเป็น
pendingsuccesserrordeleting
next_cursorstring | nullจำเป็น
curl -s -X GET "https://api.xver.cloud/v2/servers/0195c1e4-7b3a-7d12-8a4f-000000000001/backups" \
  -H "Authorization: Bearer $XVER_TOKEN"
ตัวอย่างคำตอบ (200)
{
  "data": [
    {
      "created_at": "2026-11-28T09:00:00Z",
      "expires_at": "2026-11-28T09:00:00Z",
      "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
      "kind": "automated",
      "name": "web-01",
      "price": null,
      "server_id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
      "size_bytes": 80,
      "status": "pending"
    }
  ],
  "next_cursor": "eyJpZCI6IjAxOTVjMWU0In0"
}

Block Storage

ดูรายการและรายละเอียดดิสก์ Block Storage ในโปรเจกต์

GET/volumesScope: volumes:read

List the volumes of a project

พารามิเตอร์

project_idquerystring (uuid)

May be left out when the token has one project; with more it is project_required.

limitqueryinteger (int64)default: 25

min: 1 · max: 100

cursorquerystring

next_cursor of the page before. Do not build or parse it.

maxLen: 512

คำตอบ (Responses)

200 OK · VolumeList

dataVolume[]จำเป็น
accessstringจำเป็น
nonereadmanagedelete
attachmentanyจำเป็น
created_atstring (date-time)จำเป็น
idstring (uuid)จำเป็น
namestringจำเป็น
pricePriceจำเป็น
currencystringจำเป็น
hourlystringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

monthly_maxstringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

project_idstring (uuid)จำเป็น
size_gibinteger (int64)จำเป็น
statusstringจำเป็น
creatingavailableattachingattacheddetachingresizingdeletingerror
status_reasonstring
next_cursorstring | nullจำเป็น
curl -s -X GET "https://api.xver.cloud/v2/volumes" \
  -H "Authorization: Bearer $XVER_TOKEN"
ตัวอย่างคำตอบ (200)
{
  "data": [
    {
      "access": "none",
      "attachment": null,
      "created_at": "2026-11-28T09:00:00Z",
      "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
      "name": "web-01",
      "price": {
        "currency": "THB",
        "hourly": "string",
        "monthly_max": "string"
      },
      "project_id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
      "size_gib": 80,
      "status": "creating",
      "status_reason": "string"
    }
  ],
  "next_cursor": "eyJpZCI6IjAxOTVjMWU0In0"
}
GET/volumes/{volume_id}Scope: volumes:read

Get a volume

พารามิเตอร์

volume_idpathstring (uuid)จำเป็น

คำตอบ (Responses)

200 OK · Volume

accessstringจำเป็น
nonereadmanagedelete
attachmentanyจำเป็น
created_atstring (date-time)จำเป็น
idstring (uuid)จำเป็น
namestringจำเป็น
pricePriceจำเป็น
currencystringจำเป็น
hourlystringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

monthly_maxstringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

project_idstring (uuid)จำเป็น
size_gibinteger (int64)จำเป็น
statusstringจำเป็น
creatingavailableattachingattacheddetachingresizingdeletingerror
status_reasonstring
curl -s -X GET "https://api.xver.cloud/v2/volumes/0195c1e4-7b3a-7d12-8a4f-000000000001" \
  -H "Authorization: Bearer $XVER_TOKEN"
ตัวอย่างคำตอบ (200)
{
  "access": "none",
  "attachment": null,
  "created_at": "2026-11-28T09:00:00Z",
  "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
  "name": "web-01",
  "price": {
    "currency": "THB",
    "hourly": "string",
    "monthly_max": "string"
  },
  "project_id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
  "size_gib": 80,
  "status": "creating",
  "status_reason": "string"
}

SSH Keys

ดูรายการ SSH public key ที่บันทึกไว้สำหรับใช้ตอนสร้างเซิร์ฟเวอร์

GET/ssh-keysScope: ssh_keys:read

List the SSH keys of the owner of the token, which belong to no project

พารามิเตอร์

limitqueryinteger (int64)default: 25

min: 1 · max: 100

cursorquerystring

next_cursor of the page before. Do not build or parse it.

maxLen: 512

คำตอบ (Responses)

200 OK · SshKeyList

dataSshKey[]จำเป็น
created_atstring (date-time)จำเป็น
fingerprintstringจำเป็น
idstring (uuid)จำเป็น
namestringจำเป็น
public_keystringจำเป็น
typestringจำเป็น
next_cursorstring | nullจำเป็น
curl -s -X GET "https://api.xver.cloud/v2/ssh-keys" \
  -H "Authorization: Bearer $XVER_TOKEN"
ตัวอย่างคำตอบ (200)
{
  "data": [
    {
      "created_at": "2026-11-28T09:00:00Z",
      "fingerprint": "string",
      "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
      "name": "web-01",
      "public_key": "string",
      "type": "string"
    }
  ],
  "next_cursor": "eyJpZCI6IjAxOTVjMWU0In0"
}
GET/ssh-keys/{ssh_key_id}Scope: ssh_keys:read

Get an SSH key

พารามิเตอร์

ssh_key_idpathstring (uuid)จำเป็น

คำตอบ (Responses)

200 OK · SshKey

created_atstring (date-time)จำเป็น
fingerprintstringจำเป็น
idstring (uuid)จำเป็น
namestringจำเป็น
public_keystringจำเป็น
typestringจำเป็น
curl -s -X GET "https://api.xver.cloud/v2/ssh-keys/0195c1e4-7b3a-7d12-8a4f-000000000001" \
  -H "Authorization: Bearer $XVER_TOKEN"
ตัวอย่างคำตอบ (200)
{
  "created_at": "2026-11-28T09:00:00Z",
  "fingerprint": "string",
  "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
  "name": "web-01",
  "public_key": "string",
  "type": "string"
}

ยอดเงินและเครดิต

ตรวจสอบเครดิตคงเหลือของบัญชี (หน่วยบาท เป็นทศนิยมแบบ string)

GET/billing/balanceScope: billing:read

Get the credit of the owner of the token, who may not be who pays for a project

คำตอบ (Responses)

200 OK · Balance

couponstringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

currencystringจำเป็น
top_upstringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

totalstringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

trialstringจำเป็น

THB as decimal text. Do not parse it into a float.

pattern: ^-?[0-9]+(\.[0-9]{1,6})?$

curl -s -X GET "https://api.xver.cloud/v2/billing/balance" \
  -H "Authorization: Bearer $XVER_TOKEN"
ตัวอย่างคำตอบ (200)
{
  "coupon": "string",
  "currency": "THB",
  "top_up": "string",
  "total": "string",
  "trial": "string"
}

งานพื้นหลัง (Operations)

ติดตามสถานะงานที่ทำงานแบบ async เช่น การสร้าง ปรับขนาด หรือรีบูตเซิร์ฟเวอร์

GET/operationsPublic

List the operations this token started

พารามิเตอร์

statusquerystring
limitqueryinteger (int64)default: 25

min: 1 · max: 100

cursorquerystring

next_cursor of the page before. Do not build or parse it.

maxLen: 512

คำตอบ (Responses)

200 OK · OperationList

dataOperation[]จำเป็น
created_atstring (date-time)จำเป็น
erroranyจำเป็น
finished_atstring (date-time) | nullจำเป็น
idstring (uuid)จำเป็น
kindstringจำเป็น

Clients must accept kinds they do not know.

server.createserver.deleteserver.startserver.shutdownserver.rebootserver.resizevolume.createvolume.resizevolume.attachvolume.detachvolume.deletebackup.createbackup.deletebackup.restore
originstringจำเป็น
webtokenxverctlmcpchatbotcloud_shellsystem
project_idstring (uuid)จำเป็น
resourceOperationResourceจำเป็น
idstring (uuid)จำเป็น
namestring
typestringจำเป็น
servervolumebackup
started_atstring (date-time) | null
statusstringจำเป็น
pendingrunningsucceededfailed
next_cursorstring | nullจำเป็น
curl -s -X GET "https://api.xver.cloud/v2/operations" \
  -H "Authorization: Bearer $XVER_TOKEN"
ตัวอย่างคำตอบ (200)
{
  "data": [
    {
      "created_at": "2026-11-28T09:00:00Z",
      "error": null,
      "finished_at": "2026-11-28T09:00:00Z",
      "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
      "kind": "server.create",
      "origin": "web",
      "project_id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
      "resource": {
        "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
        "name": "web-01",
        "type": "server"
      },
      "started_at": "2026-11-28T09:00:00Z",
      "status": "pending"
    }
  ],
  "next_cursor": "eyJpZCI6IjAxOTVjMWU0In0"
}
GET/operations/{operation_id}Public

Get an operation this token started

พารามิเตอร์

operation_idpathstring (uuid)จำเป็น

คำตอบ (Responses)

200 OK · Operation

Response Headers

Retry-After (integer) Seconds before asking again, while it is not done.

created_atstring (date-time)จำเป็น
erroranyจำเป็น
finished_atstring (date-time) | nullจำเป็น
idstring (uuid)จำเป็น
kindstringจำเป็น

Clients must accept kinds they do not know.

server.createserver.deleteserver.startserver.shutdownserver.rebootserver.resizevolume.createvolume.resizevolume.attachvolume.detachvolume.deletebackup.createbackup.deletebackup.restore
originstringจำเป็น
webtokenxverctlmcpchatbotcloud_shellsystem
project_idstring (uuid)จำเป็น
resourceOperationResourceจำเป็น
idstring (uuid)จำเป็น
namestring
typestringจำเป็น
servervolumebackup
started_atstring (date-time) | null
statusstringจำเป็น
pendingrunningsucceededfailed
curl -s -X GET "https://api.xver.cloud/v2/operations/0195c1e4-7b3a-7d12-8a4f-000000000001" \
  -H "Authorization: Bearer $XVER_TOKEN"
ตัวอย่างคำตอบ (200)
{
  "created_at": "2026-11-28T09:00:00Z",
  "error": null,
  "finished_at": "2026-11-28T09:00:00Z",
  "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
  "kind": "server.create",
  "origin": "web",
  "project_id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
  "resource": {
    "id": "0195c1e4-7b3a-7d12-8a4f-000000000001",
    "name": "web-01",
    "type": "server"
  },
  "started_at": "2026-11-28T09:00:00Z",
  "status": "pending"
}