VPS.org API

టెక్స్టు API పత్రికీకరణQuery

ప్లాన్స్ API

సేవిక మీరు అవ్షైర్ ప్రణాళికలను, వాటి వనరులను మరియు విలువలను కలిగి తొలగించవచ్చు. ఒక సెర్వర్ను సృష్టించునప్పుడు లేదా పునఃపరిమాణం చేస్తున్నప్పుడు, ఆ పథకము 'uuid' ను అనువర్తనంకు పాస్‌చేయుము.

అంత్య బిందువులు 2
బేస్ పాత్ /api/v1/plans
పొందండి /api/v1/plans/

అన్ని ప్లాన్‌లను జాబితా చేయండి

క్రియాశీల ప్రతి పథకమును తిరిగివుంచుము, తక్కువ విలువగల మొదటిది. ఈ జాబితాలో ఫిల్టర్లు లేవు మరియు ప్రస్తుతం ఒక పేజీకు సరిపోలుతుంది.

అనుమతించు: plans:list

ఉదాహరణ అభ్యర్థన

cURL
Python
JavaScript
PHP
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 ప్లాన్ గుర్తింపుదారి. apt_uid_ వలె లేదా కొత్త_వైజ్ యుఐడి వలె వుపయోగించుము.
cpu integer vCPUs సంఖ్య
ram, ram_unit integer, string మెమొరి పరిమాణం మరియు దాని యూనిట్ (ఎంబి లేదా GB)
disk_space integer డిస్కు పరిమాణము GB లో
disk_space_total integer ఎంబి నందు డిస్కు పరిమాణము
transfer, transfer_unit integer, string నెలకొనివున్నప్పుడు డాటా బదిలీ మరియు దాని యూనిట్ (జిబి లేదా TB)
disk_space_unit string డిస్కు ఖాళీ (జిబి)
includes_ipv4 boolean ప్రాజెక్టులో APOv4 చిరునామా ఉండాలా. వాటిలో ఒకదాని లేకుండా ప్లాన్లు IPv6 మాత్రమే; IPv4 చిరునామాలు $2.00/ నెలకు చేర్చబడవచ్చు.
monthly_price, price string USD లో నెల విలువ దశాంశ స్ట్రింగ్. విలువ అదే విలువ.
hourly_price string USD లొ గంట విలువ దశాంశ పదమువలె
cpu_type_name string ఉదాహరణకు CPU రకము, సిపియు రకం చెయబడింది. GPU పధకం వంటి, CPU రకము లేకుండా ప్రాజెక్టుల కొరకు ఓపెన్.
is_active boolean ఈ జాబితానందు ఎల్లప్పుడు నిజము, క్రియాహీన ప్రాజెక్టులు తిరిగివుంచబడవు
is_gpu, gpu_count, gpu_model boolean, integer, string [ 16వ పేజీలోని చిత్ర
ప్రాసెస్ విధానం IPv4 చిరునామా ను కలిగి ఉందో లేదో చెప్పుటలేదు. 512 MB ప్లాట్ IPv6; ఇతర ప్రస్తుత ప్రణాళికలు IPv4 కలిగి ఉంటాయి. IPv4 పై చేరగల ప్లాట్‌ కోసం ప్రణాళిక ఎంచుకోవడానికి ముందుగా చిత్రాన్ని తో పోల్చండి.

ప్రతిస్పందన స్థితి కోడ్‌లు

200 ప్రాజెక్టుల జాబితా సమర్ధవంతంగా వెలికితీయబడింది
403 చెల్లని API గుర్తు లేదా అవసరమైన సూచనకు లేదా గుర్తించవలసిన అనుమతి లేదు
పొందండి /api/v1/plans/{uuid}/

ప్లాన్ వివరాలను పొందండి

ఒక క్రియాశీల పథకాన్ని పైనున్న ఫీల్‌లతో తిరిగివుంచుతుంది. క్రియాహీన లేదా తెలియని uid 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": ""
}