List 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.
Retourne chaque plan actif, le moins cher d'abord. La liste n'a pas de filtres et actuellement s'adapte sur une page.
Kuda mvumo: 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": ""
}
]
}
| _Firi | Rudzi | Kutaura |
|---|---|---|
uuid |
string | Plan identifier. Usaishandisa se plan_uuid kana new_plan_uuid. |
cpu |
integer | Nhamba yezvinyorwa |
ram, ram_unit |
integer, string | Memory amount and its unit (MB or GB) |
disk_space |
integer | Upamhi hwedisk muGB |
disk_space_total |
integer | Upamhi hwedisk muMB |
transfer, transfer_unit |
integer, string | Mubhadharo wemwedzi wedata transfer uye chiyero chake (GB kana TB) |
disk_space_unit |
string | Unit of disk_space (GB) |
includes_ipv4 |
boolean | Kana chirongwa ichisanganisira IPv4 kero yevanhu. Zvirongwa zvisina imwe ndezve IPv6 chete; IPv4 kero inogona kuwanikwa ne $2.00/mwedzi. |
monthly_price, price |
string | Monthly mutengo muUSD sedecimal string. mutengo ndeimwe chete kukosha. |
hourly_price |
string | Hourly mutengo mu USD se decimal string |
cpu_type_name |
string | CPU mhando, semuenzaniso, Shared. Kusiya kunze kwezvirongwa pasina CPU mhando, semuenzaniso, GPU chirongwa. |
is_active |
boolean | Anoramba achiva true munyaya iyi, nekuti anoramba achizviita mashoko asingazivikanwe. |
is_gpu, gpu_count, gpu_model |
boolean, integer, string | Kana chirongwa chine zvakananga GPUs, ndezvipi, uye ndeipi model |
| 200 | Kubudirira kudzoreredza mapurojekiti mazita |
| 403 | Kukanganisa kweAPI Token kana kuti Token haina mvumo yakakodzera |
Retourne un plan actif avec les champs ci- dessus. Un inactive ou inconnu uuid retourne 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": ""
}