List the server plans you can deploy, with their resources and prices. Pass a plan's uuid as plan_uuid when you create or resize a server.
Visszaadja minden aktív tervet, legolcsóbb először. A lista nincs szűrők, és jelenleg illeszkedik egy oldalon.
Szükséges engedély: plans:list
curl -X GET "https://admin.vps.org/api/v1/plans/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
url = "https://admin.vps.org/api/v1/plans/"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}
response = requests.get(url, headers=headers)
for plan in response.json()["results"]:
print(plan["uuid"], plan["cpu"], plan["ram"], plan["ram_unit"], plan["monthly_price"])
const response = await fetch('https://admin.vps.org/api/v1/plans/', {
headers: { 'Authorization': 'Bearer YOUR_API_TOKEN' }
});
const data = await response.json();
console.log(data.results);
$ch = curl_init('https://admin.vps.org/api/v1/plans/');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_API_TOKEN']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$plans = json_decode(curl_exec($ch), true);
curl_close($ch);
{
"count": 12,
"next": null,
"previous": null,
"results": [
{
"uuid": "ed0ac717-c26c-4d9b-a801-b170c4979028",
"cpu": 1,
"ram": 512,
"ram_unit": "MB",
"disk_space": 10,
"disk_space_total": 10240,
"transfer": 500,
"transfer_unit": "GB",
"includes_ipv4": false,
"price": "2.50",
"cpu_type_name": "Shared",
"is_active": true,
"hourly_price": "0.004",
"monthly_price": "2.50",
"is_gpu": false,
"gpu_count": 0,
"gpu_model": ""
},
{
"uuid": "14186969-fbaf-43e1-9ab2-b1f1aeb66674",
"cpu": 1,
"ram": 2,
"ram_unit": "GB",
"disk_space": 25,
"disk_space_total": 25600,
"transfer": 1,
"transfer_unit": "TB",
"includes_ipv4": true,
"price": "5.00",
"cpu_type_name": "Shared",
"is_active": true,
"hourly_price": "0.007",
"monthly_price": "5.00",
"is_gpu": false,
"gpu_count": 0,
"gpu_model": ""
}
]
}
| Mező | Típus | Leírás |
|---|---|---|
uuid |
string | Plan identifier. Use it as plan_uuid or new_plan_uuid. |
cpu |
integer | VCPU-k száma |
ram, ram_unit |
integer, string | Memóriamennyiség és egysége (MB vagy GB) |
disk_space |
integer | Lemezméret GB-ban |
disk_space_total |
integer | Lemezméret MB-ban |
transfer, transfer_unit |
integer, string | Havi adattovábbítási támogatás és egysége (GB vagy TB) |
disk_space_unit |
string | A lemez_tér egysége (GB) |
includes_ipv4 |
boolean | A terv tartalmaz-e nyilvános IPv4 címet. A tervek nélkül csak IPv6; IPv4 cím lehet hozzáadni 2,00$/hó. |
monthly_price, price |
string | Havi ár USD-ben tizedessorként. ár ugyanaz az érték. |
hourly_price |
string | Hourly price in USD as a decimal string |
cpu_type_name |
string | CPU-típus, például megosztott. CPU-típus nélküli tervekhez, mint például a GPU-tervhez hozzárendelve. |
is_active |
boolean | Mindig igaz ez a listában, mert az inaktív tervek nem kerülnek vissza. |
is_gpu, gpu_count, gpu_model |
boolean, integer, string | Hogy a terv tartalmaz-e dedikált GPU-kat, hányat és melyik modellt |
| 200 | Sikeresen letöltött tervlista |
| 403 | Hiányzó vagy érvénytelen API token, vagy a token hiányzik a szükséges engedély |
Visszaad egy aktív tervet a fenti mezőkkel. Egy inaktív vagy ismeretlen uvid értéke 404.
curl -X GET "https://admin.vps.org/api/v1/plans/ed0ac717-c26c-4d9b-a801-b170c4979028/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
{
"uuid": "ed0ac717-c26c-4d9b-a801-b170c4979028",
"cpu": 1,
"ram": 512,
"ram_unit": "MB",
"disk_space": 10,
"disk_space_total": 10240,
"transfer": 500,
"transfer_unit": "GB",
"includes_ipv4": false,
"price": "2.50",
"cpu_type_name": "Shared",
"is_active": true,
"hourly_price": "0.004",
"monthly_price": "2.50",
"is_gpu": false,
"gpu_count": 0,
"gpu_model": ""
}