VPS.org API

REST API દસ્તાવેજીકરણ

સર્વર્સ API

બનાવો, તપાસો, પાવર, માપ બદલો અને તમારા VPS સર્વરોને કાઢી નાંખો. સર્વરોને તેમના uuid દ્વારા ઓળખવામાં આવે છે.

અંતિમ બિંદુઓ 15
બેઝ પાથ /api/v1/servers
મેળવો /api/v1/servers/

બધા સર્વરોની યાદી બનાવો

તમારા ખાતામાં સર્વરોને પાછા આપે છે, નવી પહેલી, પાના દીઠ ૨૫. સર્વરોને કે જે કાઢી નાંખવામાં આવે છે તે સમાવેશ થયેલ નથી.

જરૂરી પરવાનગી: servers:list

ક્વેરી પરિમાણો

પરિમાણો પ્રકાર જરૂરી વર્ણન
page integer નહિં પાનાં નંબર, ૧ થી શરૂ થાય છે
page_size integer નહિં પાના પર પરિણામો (મૂળભૂત ૨૫, મહત્તમ ૧૦૦)

ઉદાહરણ વિનંતી

cURL
Python
JavaScript
PHP
curl -X GET "https://admin.vps.org/api/v1/servers/" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
import requests

url = "https://admin.vps.org/api/v1/servers/"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}

response = requests.get(url, headers=headers)
for server in response.json()["results"]:
    print(server["uuid"], server["hostname"], server["status"])
const response = await fetch('https://admin.vps.org/api/v1/servers/', {
  headers: { 'Authorization': 'Bearer YOUR_API_TOKEN' }
});

const data = await response.json();
console.log(data.results);
$ch = curl_init('https://admin.vps.org/api/v1/servers/');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_API_TOKEN']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

foreach ($data['results'] as $server) {
    echo $server['hostname'] . ' ' . $server['status'] . "\n";
}

ઉદાહરણ પ્રતિભાવ

{
  "count": 2,
  "next": null,
  "previous": null,
  "results": [
    {
      "uuid": "8c4f2a1e-5b3d-4e6f-9a7b-1c2d3e4f5a6b",
      "hostname": "web-01",
      "status": "on",
      "error_description": null,
      "location_name": "New Jersey",
      "plan_name": "1 vCPU / 2 GB RAM / 10 GB",
      "os_name": "Ubuntu",
      "ipv4_addresses": ["203.0.113.10"],
      "ipv6_addresses": ["2001:db8:2:dd::f9:6b"],
      "created_at": "2026-07-30T03:54:14.914364Z",
      "deployed": true
    },
    {
      "uuid": "2d7e9b40-6c1a-4f3e-8b5d-9a0c1e2f3b4d",
      "hostname": "db-01",
      "status": "queue",
      "error_description": null,
      "location_name": "New Jersey",
      "os_name": "Debian",
      "ipv4_addresses": [],
      "ipv6_addresses": [],
      "created_at": "2026-09-14T19:33:49.426508Z",
      "deployed": false
    }
  ]
}

પ્રતિભાવ ક્ષેત્રો

ક્ષેત્ર પ્રકાર વર્ણન
uuid string દરેક બીજા સર્વર અંતબિંદુમાં વપરાયેલ સર્વર ઓળખ
hostname string સર્વર બનાવતી વખતે તમે પસંદ કરેલ યજમાનનામ
status string વર્તમાન સ્થિતિ. સર્વર સ્થિતિ કિંમતો નીચે જુઓ.
error_description string | null છેલ્લી નિષ્ફળતાની વિગતો જ્યારે સ્થિતિ ભૂલ હોય, નહિંતર ન્યુલ
location_name string સ્થાનનું નામ કે જ્યાં સર્વર ચાલે છે
os_name string ઓપરેટિંગ સિસ્ટમ નામ, આવૃત્તિ વગર
plan_name string વાંચવાલાયક યોજના સારાંશ, ઉદાહરણ તરીકે ૧ vCPU / ૨ GB RAM / ૧૦ GB
ipv4_addresses array IPv4 સરનામાં શબ્દમાળાઓ તરીકે. ખાલી જ્યાં સુધી સર્વર સ્થાપિત થયેલ હોય, અને IPv4 વગરની યોજનાઓ પર.
ipv6_addresses array IPv6 સરનામાં શબ્દમાળાઓ તરીકે. સર્વરને સ્થાપિત થાય ત્યાં સુધી ખાલી.
created_at datetime બનાવટ સમય (ISO 8601, UTC)
deployed boolean true જ્યારે પૂરુ પાડવાનું સમાપ્ત થયેલ હોય

પ્રતિભાવ સ્થિતિ કોડ્સ

200 સર્વર સૂચિ સફળતાપૂર્વક મેળવી
403 ગુમ થયેલ અથવા અયોગ્ય API ટોકન, અથવા ટોકન પાસે જરૂરી પરવાનગી નથી
પોસ્ટ /api/v1/servers/

નવું સર્વર બનાવો

નવું સર્વર સ્થાપન માટે કતારમાં મૂકે છે અને સ્થિતિ કતાર સાથે તેને તરત જ પાછું આપે છે. પૂરી પાડવાનું પાશ્વ ભાગમાં ચાલુ રહે છે: સ્થિતિ અંતિમબિંદુને પૂછો જ્યાં સુધી સ્થાપિત થયેલ હોય તે સાચું હોય. જ્યારે સર્વર તૈયાર હોય, તેની પ્રવેશ વિગતો ખાતા માલિકને ઇમેઇલ કરવામાં આવે છે.

તમારા ખાતાને સંગ્રહાયેલ ચૂકવણી પદ્ધતિની જરૂર છે. તમારા ખાતા ઇતિહાસ પર આધાર રાખીને, સર્વર બનાવવામાં આવે તે પહેલાં તમારા કાર્ડ પર યોજના કિંમતના એક અઠવાડિયા (લગભગ 1 USD) ની કામચલાઉ પૂર્વ-અધિકાર ધરાવતી હોલ્ડ મૂકવામાં આવી શકે છે.

જરૂરી પરવાનગી: servers:create

બોડી પેરામીટર્સની વિનંતી કરો

પરિમાણો પ્રકાર જરૂરી વર્ણન
hostname string હા ઓછામાં ઓછા3અક્ષરો. માત્ર અક્ષરો, અંક, હાયફન અને અંતરાલ જ.
location_id integer હા સ્થાનો API માંથી સક્રિય સ્થાનની id
plan_uuid string હા યોજનાઓ API માંથી સક્રિય યોજનાનું uuid
operating_system_version_uuid string હા ઓપરેટિંગ સિસ્ટમની આવૃત્તિ યાદીમાં સક્રિય પ્રવેશનું uuid
ssh_key_uuids array નહિં સર્વર પર સ્થાપિત કરવા માટે SSH કી API માંથી SSH કી UUIDs
ssh_key_ids array નહિં SSH કીનાં સંપૂર્ણ સંખ્યા ids, ssh_key_uuids માટે વૈકલ્પિક તરીકે. જો બંને મોકલવામાં આવે તો, ssh_key_ids વાપરી શકાય છે.
ssh_key_uuid, ssh_key_id string, integer નહિં એક SSH કી માટે ટૂંકાણ
auth_method string નહિં પાસવર્ડ, ssh_key અથવા બંને. મૂળભૂત પાસવર્ડ, અથવા બંને માટે જ્યારે SSH કીઓ પૂરી પાડવામાં આવે છે.

ઉદાહરણ વિનંતી

cURL
Python
JavaScript
PHP
curl -X POST "https://admin.vps.org/api/v1/servers/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "hostname": "web-01",
    "location_id": 1,
    "plan_uuid": "3bc2faf6-8f8b-4978-b62d-b52ed3f858e9",
    "operating_system_version_uuid": "c3418f90-80a0-4e00-a7e1-d0ab1822b941",
    "ssh_key_uuids": ["YOUR_SSH_KEY_UUID"]
  }'
import requests

url = "https://admin.vps.org/api/v1/servers/"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}
data = {
    "hostname": "web-01",
    "location_id": 1,
    "plan_uuid": "3bc2faf6-8f8b-4978-b62d-b52ed3f858e9",
    "operating_system_version_uuid": "c3418f90-80a0-4e00-a7e1-d0ab1822b941",
    "ssh_key_uuids": ["YOUR_SSH_KEY_UUID"],
}

response = requests.post(url, headers=headers, json=data)
server = response.json()
print(response.status_code, server["uuid"], server["status"])
const response = await fetch('https://admin.vps.org/api/v1/servers/', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    hostname: 'web-01',
    location_id: 1,
    plan_uuid: '3bc2faf6-8f8b-4978-b62d-b52ed3f858e9',
    operating_system_version_uuid: 'c3418f90-80a0-4e00-a7e1-d0ab1822b941',
    ssh_key_uuids: ['YOUR_SSH_KEY_UUID']
  })
});

const server = await response.json();
console.log(server.uuid, server.status);
$data = [
    'hostname' => 'web-01',
    'location_id' => 1,
    'plan_uuid' => '3bc2faf6-8f8b-4978-b62d-b52ed3f858e9',
    'operating_system_version_uuid' => 'c3418f90-80a0-4e00-a7e1-d0ab1822b941',
    'ssh_key_uuids' => ['YOUR_SSH_KEY_UUID']
];

$ch = curl_init('https://admin.vps.org/api/v1/servers/');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer YOUR_API_TOKEN',
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$server = json_decode(curl_exec($ch), true);
curl_close($ch);

ઉદાહરણ પ્રતિભાવ

૨૦૧ સર્વર વિગતો મેળવો નીચે વર્ણવેલ સંપૂર્ણ સર્વર ઓબ્જેક્ટ સાથે બનાવેલ છે. સરનામાં અને vmid એકવાર સ્થાપન સમાપ્ત થાય ત્યારે ભરેલ છે.

{
  "uuid": "5f0c8e2a-6b1d-4c3e-9a7f-2d4b6c8e0a1f",
  "hostname": "web-01",
  "vmid": null,
  "status": "queue",
  "error_description": null,
  "location": {
    "id": 1,
    "name": "New Jersey",
    "country_name": "United States",
    "is_active": true
  },
  "plan": {
    "uuid": "3bc2faf6-8f8b-4978-b62d-b52ed3f858e9",
    "cpu": 1,
    "ram": 2,
    "ram_unit": "GB",
    "disk_space": 10,
    "disk_space_total": 10240,
    "transfer": 500,
    "price": "3.50",
    "cpu_type_name": "Shared",
    "is_active": true,
    "hourly_price": "0.005",
    "monthly_price": "3.50",
    "is_gpu": false,
    "gpu_count": 0,
    "gpu_model": ""
  },
  "operating_system": {
    "id": 1,
    "name": "Ubuntu",
    "svg_icon": "<svg ...>",
    "versions": [ ... ]
  },
  "operating_system_version": {
    "uuid": "c3418f90-80a0-4e00-a7e1-d0ab1822b941",
    "name": "24.04 LTS x64",
    "os_name": "Ubuntu",
    "os_svg_icon": "<svg ...>",
    "is_active": true
  },
  "ipv4_addresses": [],
  "ipv6_addresses": [],
  "deployed": false,
  "created_at": "2026-09-14T21:02:11.402113Z",
  "recent_actions": []
}

પ્રતિભાવ સ્થિતિ કોડ્સ

201 સર્વર બનાવેલ છે અને વિસ્તરણ માટે કતારબંધ થયેલ છે
400 માન્યતા ભૂલ, ઉદાહરણ તરીકે નિષ્ક્રિય સ્થાન, યોજના અથવા ઓપરેટિંગ સિસ્ટમ આવૃત્તિ
402 ફાઇલ પર કોઈ ચૂકવણી પદ્ધતિ નથી, ચૂકવેલ બિલ નથી, અથવા કાર્ડ પૂર્વ-અધિકારને નકારવામાં આવ્યું હતું
403 ગુમ થયેલ અથવા અયોગ્ય API ટોકન, અથવા ટોકન પાસે જરૂરી પરવાનગી નથી
429 તમારુ ખાતુ તેની સર્વર બનાવટ મર્યાદા સુધી પહોંચી ગયુ છે
મેળવો /api/v1/servers/{uuid}/

સર્વર વિગતો મેળવો

સર્વર તેની સ્થાન, યોજના, ઓપરેટિંગ સિસ્ટમ, IP સરનામાં અને પાંચ છેલ્લે થયેલ ક્રિયાઓ સાથે પાછું આપે છે.

જરૂરી પરવાનગી: servers:list

curl -X GET "https://admin.vps.org/api/v1/servers/8c4f2a1e-5b3d-4e6f-9a7b-1c2d3e4f5a6b/" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

ઉદાહરણ પ્રતિભાવ

{
  "uuid": "8c4f2a1e-5b3d-4e6f-9a7b-1c2d3e4f5a6b",
  "hostname": "web-01",
  "vmid": 1042,
  "status": "on",
  "error_description": null,
  "location": {
    "id": 1,
    "name": "New Jersey",
    "country_name": "United States",
    "is_active": true
  },
  "plan": {
    "uuid": "14186969-fbaf-43e1-9ab2-b1f1aeb66674",
    "cpu": 1,
    "ram": 2,
    "ram_unit": "GB",
    "disk_space": 25,
    "disk_space_total": 25600,
    "transfer": 1,
    "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": ""
  },
  "operating_system": {
    "id": 1,
    "name": "Ubuntu",
    "svg_icon": "<svg ...>",
    "versions": [ ... ]
  },
  "operating_system_version": {
    "uuid": "c3418f90-80a0-4e00-a7e1-d0ab1822b941",
    "name": "24.04 LTS x64",
    "os_name": "Ubuntu",
    "os_svg_icon": "<svg ...>",
    "is_active": true
  },
  "ipv4_addresses": [
    {
      "ip": "203.0.113.10",
      "gateway": "203.0.113.1",
      "subnet": "203.0.113.0",
      "rdns": "web-01.example.com"
    }
  ],
  "ipv6_addresses": [
    {
      "ip": "2001:db8:2:dd::f9:6b",
      "gateway": "2001:db8:2:dd::f9:1",
      "subnet": "2001:db8:2:dd::f9:0",
      "rdns": "web-01.example.com"
    }
  ],
  "deployed": true,
  "created_at": "2026-07-30T03:54:14.914364Z",
  "recent_actions": [
    {
      "id": 17028,
      "action": "create",
      "action_display": "Create",
      "description": "Server deployed with VMID 1042",
      "user_email": "you@example.com",
      "created_at": "2026-07-30T03:54:32.860854Z"
    }
  ]
}

SVG ચિહ્ન માર્કઅપ અને આવૃત્તિ યાદી અહીં ટૂંકાવી દેવામાં આવી છે.

પ્રતિભાવ ક્ષેત્રો

ક્ષેત્ર પ્રકાર વર્ણન
vmid integer | null વર્ચ્યુઅલ મશીન નંબર, સ્થાપન દરમિયાન સુયોજિત થયેલ છે
location object સ્થાન ઓબ્જેક્ટ, જેમ કે સ્થાનો API દ્દારા પાછુ આવે છે
plan object યોજના વસ્તુ, જેમ કે યોજનાઓ API દ્દારા પાછુ આવે છે
operating_system, operating_system_version object ઓપરેટિંગ સિસ્ટમ અને સ્થાપિત થયેલ આવૃત્તિ, જેમ કે ઓપરેટિંગ સિસ્ટમો API દ્દારા પાછુ મળેલ છે
ipv4_addresses, ipv6_addresses array ip, gateway, subnet અને rdns સાથે સરનામાં માટે એક વસ્તુ (ઉલટું DNS યજમાનનામ)
recent_actions array છેલ્લે થયેલ પાંચ ક્રિયાઓ સુધી: id, action, action_display, description, user_email, created_at

પ્રતિભાવ સ્થિતિ કોડ્સ

200 સર્વર વિગતો સફળતાપૂર્વક મેળવી
404 મળ્યુ નથી, અથવા તે બીજા ખાતાને લગતુ છે
મેળવો /api/v1/servers/{uuid}/status/

સર્વર સ્થિતિ મેળવો

તમે સર્વરને બનાવ્યા પછી, પાવર અથવા માપ બદલ્યા પછી પોલિંગ માટે હળવા કોલ.

curl -X GET "https://admin.vps.org/api/v1/servers/8c4f2a1e-5b3d-4e6f-9a7b-1c2d3e4f5a6b/status/" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "status": "on",
  "deployed": true,
  "resizing": false
}

સર્વર સ્થિતિ કિંમતો

કિંમત વર્ણન
queue ક્રિયા (વિસ્તૃત કરો, પાવર, માપ બદલો, પુનઃસંગ્રહો) કતારમાં છે અથવા પ્રગતિમાં છે
deploying પૂરુ પાડવામાં આવી રહ્યા છે. નિયંત્રણ પેનલમાંથી બનાવેલ સર્વર આ સ્થિતિ વાપરે છે; API મારફતે બનાવેલ સર્વર કતારમાં રહે છે જ્યાં સુધી તેઓ તૈયાર ન હોય.
on ચાલી રહ્યું છે
off પાવર બંધ થયેલ છે
error છેલ્લી ક્રિયા નિષ્ફળ ગઈ. error_description જુઓ.
suspended_payment ચૂકવણી ન થયેલ ચુકવણીના કારણે સ્થગિત થયેલ છે
પોસ્ટ /api/v1/servers/{uuid}/power/

સર્વર પાવર નિયંત્રિત કરો

પાવર ક્રિયા કતારમાં મૂકે છે. સર્વર સ્થિતિ કતારમાં બદલાય છે જ્યાં સુધી ક્રિયા સમાપ્ત ન થાય.

જરૂરી પરવાનગી: servers:power

બોડી પેરામીટર્સની વિનંતી કરો

પરિમાણો પ્રકાર જરૂરી વર્ણન
action string હા start: પાવર પર
shutdown: આદરપૂર્વક બંધ કરો, જો મહેમાન બંધ નહિં કરે તો દબાણપૂર્વક બંધ કરો
restart: હાર્ડ પાવર ચક્ર (બંદ કરો, પછી શરૂ કરો)
stop: હાલમાં પુન:શરૂઆત તરીકે તે જ પાવર ચક્રને ચલાવે છે. સર્વર બંધ કરવા માટે બંધ કરવાનું વાપરો.

ઉદાહરણ વિનંતી

cURL
Python
curl -X POST "https://admin.vps.org/api/v1/servers/8c4f2a1e-5b3d-4e6f-9a7b-1c2d3e4f5a6b/power/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"action": "restart"}'
import requests

server_uuid = "8c4f2a1e-5b3d-4e6f-9a7b-1c2d3e4f5a6b"
url = f"https://admin.vps.org/api/v1/servers/{server_uuid}/power/"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}

response = requests.post(url, headers=headers, json={"action": "restart"})
print(response.json())

ઉદાહરણ પ્રતિભાવ

{
  "message": "Server restart queued"
}

પ્રતિભાવ સ્થિતિ કોડ્સ

200 ક્રિયા કતારમાં હતી
400 ગુમ થયેલ અથવા બિનઆધારભૂત ક્રિયા
402 શરૂઆત નકારાયેલ છે કારણ કે ખાતા પાસે ચૂકવેલ બિલ નથી
404 મળ્યુ નથી, અથવા તે બીજા ખાતાને લગતુ છે
પોસ્ટ /api/v1/servers/{uuid}/resize/

સર્વરનું માપ બદલો

સર્વરને બીજી સક્રિય યોજના પર ખસેડે છે. નવી યોજના પાસે વર્તમાન કરતાં ઓછી ડિસ્ક જગ્યા હોઈ શકે નહિં, અને વિનંતી શરીરમાં માપ બદલવા માટે સુયોજિત ક્રિયાને સમાવવી જ જોઇએ. નવી યોજના માટે હાઇપરવિઝર ક્ષમતા કંઇક કતારમાં મૂકતા પહેલા ચકાસવામાં આવે છે, તેથી અનામત વિનંતી સર્વરને બદલ્યા વગર છોડી દે છે.

સર્વર બંધ થાય છે જ્યારે તેનું માપ બદલાય છે અને પછી ફરીથી શરૂ થાય છે. જો માપ બદલવામાં નિષ્ફળતા હોય, તો સર્વર તેની પહેલાંની યોજના પર પાછું મૂકવામાં આવે છે અને ફરીથી શરૂ થાય છે જો તે ચાલી રહ્યું હોય. ડિસ્ક વૃદ્ધિ પાછી કરી શકાતી નથી.

જરૂરી પરવાનગી: servers:resize

બોડી પેરામીટર્સની વિનંતી કરો

પરિમાણો પ્રકાર જરૂરી વર્ણન
action string હા માપ બદલવું જ જોઇએ
new_plan_uuid string હા આમાં ખસેડવા માટે યોજનાનું uuid
curl -X POST "https://admin.vps.org/api/v1/servers/8c4f2a1e-5b3d-4e6f-9a7b-1c2d3e4f5a6b/resize/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"action": "resize", "new_plan_uuid": "5e26a4a6-bd0c-467c-abca-da036c811c3f"}'
{
  "message": "Resize queued successfully"
}

માપ બદલવાનું નકારેલ ઉદાહરણ (409):

{
  "error": "Not enough hypervisor capacity for the selected plan; the server was not changed"
}

પ્રતિભાવ સ્થિતિ કોડ્સ

200 ક્રિયા કતારમાં હતી
400 ગુમ થયેલ ક્રિયા અથવા new_plan_uuid, અયોગ્ય અથવા અસક્રિય યોજના, ઓછી ડિસ્ક જગ્યા સાથે યોજના, અથવા GPU યોજના (GPU યોજનાઓ API મારફતે માપ બદલી શકાતી નથી)
404 મળ્યુ નથી, અથવા તે બીજા ખાતાને લગતુ છે
409 માપ બદલવા અથવા સંગ્રહ બદલવા માટે પહેલેથી પ્રગતિ ચાલી રહી છે, અથવા નવી યોજના માટે પૂરતી હાયપરવિઝર ક્ષમતા નથી
503 ક્ષમતા હમણાં ચકાસી શકાતી નથી. સર્વર બદલાયેલ નથી; પછી ફરીથી પ્રયત્ન કરો.
પોસ્ટ /api/v1/servers/{uuid}/reset-password/

રુટ પાસવર્ડ પુન:સુયોજિત કરો

નવો રુટ પાસવર્ડ બનાવે છે, તેને જવાબમાં પાછો આપે છે અને સર્વર પર ફેરફાર કતારમાં મૂકે છે. નવો પાસવર્ડ તમને ઈમેઈલ દ્વારા પણ મોકલવામાં આવે છે. સર્વરને સ્થાપિત કરવું જ જોઇએ. કોઈ વિનંતી શરીરની જરૂર નથી.

curl -X POST "https://admin.vps.org/api/v1/servers/8c4f2a1e-5b3d-4e6f-9a7b-1c2d3e4f5a6b/reset-password/" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "message": "Password reset queued. New password will also be emailed to you.",
  "password": "generated-password",
  "job_id": "b6f1c7e2-3a4d-4f5e-8b9c-0d1e2f3a4b5c"
}

પ્રતિભાવ સ્થિતિ કોડ્સ

200 ક્રિયા કતારમાં હતી
400 સર્વર હજુ સુધી સ્થાપિત થયેલ નથી
404 મળ્યુ નથી, અથવા તે બીજા ખાતાને લગતુ છે
મેળવો પોસ્ટ /api/v1/servers/{uuid}/rdns/

ઉલટું DNS (PTR)

GET સર્વર પર દરેક IPv4 અને IPv6 સરનામાનું ઉલટા DNS યજમાનનામ યાદી કરે છે. POST તેને એક સરનામા માટે સુયોજિત કરે છે. ખાલી યજમાનનામ મોકલવાથી સરનામું તેના મૂળભૂત ઉલટા DNS નામમાં પુનઃસુયોજિત થાય છે.

જરૂરી પરવાનગી: servers:update

બોડી પેરામીટર્સની વિનંતી કરો (POST)

પરિમાણો પ્રકાર જરૂરી વર્ણન
ip string હા આ સર્વરને સોંપાયેલ IPv4 અથવા IPv6 સરનામું
hostname string નહિં PTR યજમાનનામ. મૂળભૂતમાં પુન:સુયોજિત કરવા માટે ખાલી છોડો.
curl -X POST "https://admin.vps.org/api/v1/servers/8c4f2a1e-5b3d-4e6f-9a7b-1c2d3e4f5a6b/rdns/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ip": "203.0.113.10", "hostname": "mail.example.com"}'
{
  "message": "Reverse DNS for 203.0.113.10 set to mail.example.com",
  "ip": "203.0.113.10",
  "hostname": "mail.example.com"
}

GET જવાબ:

{
  "rdns": [
    {"ip": "203.0.113.10", "hostname": "mail.example.com"},
    {"ip": "2001:db8:2:dd::f9:6b", "hostname": "mail.example.com"}
  ]
}

પ્રતિભાવ સ્થિતિ કોડ્સ

400 ip ગેરહાજર છે, અથવા યજમાનનામ સુયોજિત કરી શકાતુ નથી
404 IP સરનામું આ સર્વરને સોંપાયેલ નથી
પોસ્ટ /api/v1/servers/{uuid}/exec/

સર્વર પર આદેશ ચલાવો

QEMU મહેમાન એજન્ટ મારફતે સર્વરની અંદર શેલ આદેશ ચલાવો અને તેને સમાપ્ત થવા માટે રાહ જુઓ. સર્વર સ્થાપિત થયેલ હોવું જ જોઇએ અને ચાલી રહ્યું હોવું જ જોઇએ, અને qemu-guest-agent સ્થાપિત થયેલ હોવું જ જોઇએ અને મહેમાનમાં ચાલી રહ્યું હોવું જ જોઇએ.

જરૂરી પરવાનગી: servers:exec

બોડી પેરામીટર્સની વિનંતી કરો

પરિમાણો પ્રકાર જરૂરી વર્ણન
command string હા આદેશ વાક્ય /bin/sh -c સાથે ચલાવો, ૨૦૦૦ અક્ષરો સુધી
timeout integer નહિં આદેશ માટે રાહ જોવા માટેની સેકન્ડો, ૧ થી ૩૦૦ (મૂળભૂત ૩૦)
curl -X POST "https://admin.vps.org/api/v1/servers/8c4f2a1e-5b3d-4e6f-9a7b-1c2d3e4f5a6b/exec/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"command": "uptime", "timeout": 30}'
{
  "stdout": " 21:14:03 up 46 days,  2:10,  0 users,  load average: 0.08, 0.03, 0.01\n",
  "stderr": "",
  "exit_code": 0,
  "timed_out": false
}

જો આદેશ હજુ પણ ચાલી રહ્યો હોય જ્યારે સમયસમાપ્તિ સમાપ્ત થાય છે, તો જવાબ timed_out true તરીકે સુયોજિત થયેલ છે અને exit_code null તરીકે સુયોજિત થયેલ છે.

પ્રતિભાવ સ્થિતિ કોડ્સ

200 આદેશ સમાપ્ત થયો અથવા સમયસમાપ્તિ
400 સર્વર વિસ્તૃત થયેલ નથી અથવા ચાલી રહ્યુ નથી, અથવા અયોગ્ય પરિમાણો
409 QEMU મહેમાન એજન્ટ સર્વર પર ચાલી રહ્યુ નથી
503 કામચલાઉ જોડાણ સમસ્યા. Retry-After હેડર પછી ફરીથી પ્રયત્ન કરો.
કાઢી નાખો /api/v1/servers/{uuid}/

સર્વર કાઢી નાખો

સર્વરને કાયમી દૂર કરવા માટે કતારમાં મૂકે છે. સર્વર યાદીમાંથી તરત જ અદ્રશ્ય થઈ જાય છે અને પુનઃસંગ્રહી શકાતુ નથી.

જરૂરી પરવાનગી: servers:delete

curl -X DELETE "https://admin.vps.org/api/v1/servers/8c4f2a1e-5b3d-4e6f-9a7b-1c2d3e4f5a6b/" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "message": "Server deletion queued"
}

પ્રતિભાવ સ્થિતિ કોડ્સ

202 સ્વીકારેલ: વિનંતી કતારમાં મૂકવામાં આવી હતી
404 મળ્યુ નથી, અથવા તે બીજા ખાતાને લગતુ છે
મેળવો પોસ્ટ /api/v1/ssh-keys/

SSH કીઓ

તમારા ખાતામાં જાહેર SSH કીઓ સંગ્રહો, પછી જ્યારે તમે સર્વર બનાવો ત્યારે તેમની uuids ને ssh_key_uuids તરીકે પાસ કરો. GET તમારી કીઓની યાદી કરે છે (પાનામાં ૨૫); POST એક ઉમેરે છે.

જરૂરી પરવાનગી: ssh-keys:list (GET), ssh-keys:create (POST)

બોડી પેરામીટર્સની વિનંતી કરો (POST)

પરિમાણો પ્રકાર જરૂરી વર્ણન
name string હા કી ને ઓળખવા માટેનું નામ, ૧૦૦ અક્ષરો સુધી
public_key string હા OpenSSH બંધારણમાં જાહેર કી, ઉદાહરણ તરીકે id_ed25519.pub ની વિગતો

ઉદાહરણ વિનંતી

cURL
Python
curl -X POST "https://admin.vps.org/api/v1/ssh-keys/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "laptop", "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... you@laptop"}'
import requests

url = "https://admin.vps.org/api/v1/ssh-keys/"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}

with open("/home/you/.ssh/id_ed25519.pub") as f:
    data = {"name": "laptop", "public_key": f.read().strip()}

response = requests.post(url, headers=headers, json=data)
print(response.status_code, response.json()["uuid"])

ઉદાહરણ પ્રતિભાવ

{
  "id": 19,
  "uuid": "6e1b9c52-3f8a-4d7e-a2c4-5b9d0e1f2a3c",
  "name": "laptop",
  "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... you@laptop",
  "fingerprint": "0b:4c:9b:48:76:e7:1d:07:b9:ac:71:90:70:f7:9a:69",
  "created_at": "2026-08-23T19:16:11.547183Z",
  "last_used_at": null
}

પ્રતિભાવ ક્ષેત્રો

ક્ષેત્ર પ્રકાર વર્ણન
id, uuid integer, string કી ઓળખનારાઓ. ssh_key_uuids માં uuid ને વાપરો અને નીચેના URL માં; id ssh_key_ids માં કામ કરે છે.
fingerprint string કીનું MD5 આંગળીની છાપ, પ્લેટફોર્મ દ્વારા ગણાય છે
last_used_at datetime | null જ્યારે કી છેલ્લે નવા સર્વર પર સ્થાપિત થયેલ હતી

પ્રતિભાવ સ્થિતિ કોડ્સ

201 કી ઉમેરાયેલ
400 નામ ગુમ થયેલ છે, અથવા જાહેર કી એ માન્ય SSH જાહેર કી નથી
મેળવો કાઢી નાખો /api/v1/ssh-keys/{uuid}/

SSH કી મેળવો અથવા કાઢી નાંખો

GET ઉપરના ક્ષેત્રો સાથે એક કી પાછી આપે છે. DELETE તમારા ખાતામાંથી તેને દૂર કરે છે અને કોઈ શરીર વગર ૨૦૪ પાછી આપે છે. કી કાઢી નાખવી એ સર્વરમાંથી તેને દૂર કરતુ નથી કે જે તે પહેલાથી સ્થાપિત થયેલ છે. કીઓને ફેરફાર કરી શકાતુ નથી: કાઢી નાખો અને ફરીથી ઉમેરો.

જરૂરી પરવાનગી: ssh-keys:list (GET), ssh-keys:delete (DELETE)

curl -X DELETE "https://admin.vps.org/api/v1/ssh-keys/6e1b9c52-3f8a-4d7e-a2c4-5b9d0e1f2a3c/" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

બેકઅપ અને સ્નેપશોટ

બેકઅપ અથવા સ્નેપશોટ બનાવવાનું પણ સર્વર ક્રિયા છે: