ඔබ ඔවුන්ගේ සම්පත් හා මිල සමග, යෙදවිය හැකි සේවාදායක සැලසුම් ලැයිස්තුගත කරන්න. ඔබ සේවාදායකයක් නිර්මාණය හෝ resize විට plan_uuid ලෙස සැලැස්ම ගේ uuid යන්න.
සෑම ක්රියාකාරී සැලැස්ම ආපසු, ලාභම පළමු. ලැයිස්තුව පෙරහන් නැත හා දැනට එක් පිටුවක ගැලපේ.
අවසර අවශ්යයි: 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": ""
}
]
}
| ක්ෂේත්රය | වර්ගය | විස්තරය |
|---|---|---|
uuid |
string | සැලැස්ම හඳුනාගැනීම. plan_uuid හෝ new_plan_uuid ලෙස එය භාවිතා කරන්න. |
cpu |
integer | vCPU ගණන |
ram, ram_unit |
integer, string | මතක ප්රමාණය සහ එහි ඒකකය (MB හෝ GB) |
disk_space |
integer | GB හි තැටි ප්රමාණය |
disk_space_total |
integer | MB හි තැටි ප්රමාණය |
transfer, transfer_unit |
integer, string | මාසික දත්ත හුවමාරු දීමනාව සහ ඒකකය (GB හෝ TB) |
disk_space_unit |
string | තැටි ඉඩ ඒකකය (GB) (_S) |
includes_ipv4 |
boolean | සැලැස්ම පොදු IPv4 ලිපිනය ඇතුළත් වේ ද යන්න. එකක් නොමැති සැලසුම් IPv6 පමණක් වේ; IPv4 ලිපිනය $ 2.00 / මාසයක් සඳහා එකතු කළ හැකිය. |
monthly_price, price |
string | දශම string ලෙස ඇමරිකානු ඩොලර් මාසික මිල. මිල එම අගය වේ. |
hourly_price |
string | දශම string ලෙස USD පැය මිල |
cpu_type_name |
string | CPU වර්ගය, උදාහරණයක් ලෙස හවුල්. CPU වර්ගය නොමැතිව සැලසුම් සඳහා, GPU සැලැස්ම වැනි අතහැර දමා ඇත. |
is_active |
boolean | අක්රීය සැලසුම් ආපසු නොලැබෙන නිසා, මෙම ලැයිස්තුවේ සැමවිටම සත්ය |
is_gpu, gpu_count, gpu_model |
boolean, integer, string | සැලැස්ම කැප GPUs ඇතුළත් වේ ද, කොපමණ, සහ මොන ආකෘතිය |
| 200 | සාර්ථකව ලබාගත් සැලසුම් ලැයිස්තුව |
| 403 | අතුරුදන් හෝ වලංගු API ටොකන්, හෝ ටොකන් අවශ්ය අවසර නොමැත |
ඉහත ක්ෂේත්ර සමග එක් ක්රියාකාරී සැලැස්ම ආපසු. අක්රිය හෝ නොදන්නා uuid 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": ""
}