서버를 만들거나 크기를 조정할 때 플랜의 uuid를 plan_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) |
includes_ipv4 |
boolean | 플랜에 공용 IPv4 주소가 포함되어 있는지 여부. IPv4 주소가 없는 플랜은 IPv6만 지원하며, IPv4 주소는 월 $2.00에 추가할 수 있습니다. |
monthly_price, price |
string | 십진법 문자열로 USD의 월간 가격. 가격은 동일한 값입니다. |
hourly_price |
string | 소수점 문자열로 USD의 시간당 가격 |
cpu_type_name |
string | CPU 유형(예: 공유). CPU 유형이 없는 플랜(예: GPU 플랜)의 경우 생략됩니다. |
is_active |
boolean | 비활성 계획이 반환되지 않기 때문에 이 목록에서 항상 true |
is_gpu, gpu_count, gpu_model |
boolean, integer, string | 플랜에 전용 GPU가 포함되어 있는지 여부, 얼마나 많은지, 어떤 모델인지 |
| 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": ""
}