VPS.org API

ឯកសារ REST API

API ប្រព័ន្ធប្រតិបត្តិការ

ទាញយកព័ត៌មានអំពីប្រព័ន្ធប្រតិបត្តិការ និងការចែកចាយដែលមានសម្រាប់ម៉ាស៊ីនមេ VPS របស់អ្នក។

ចំណុចបញ្ចប់ 2 endpoints
ផ្លូវមូលដ្ឋាន /api/v1/operating-systems
ទទួលបាន /api/v1/operating-systems/

រាយបញ្ជីប្រព័ន្ធប្រតិបត្តិការទាំងអស់

យក​បញ្ជី​នៃ​ប្រព័ន្ធ​ប្រតិបត្តិការ​ដែល​អាច​ប្រើ​បាន​ទាំងអស់​ដែល​អាច​ត្រូវ​បាន​ដំឡើង​លើ​ម៉ាស៊ីន​បម្រើ VPS & # 160; ។

ប៉ារ៉ាម៉ែត្រសំណួរ

ប៉ារ៉ាម៉ែត្រ ប្រភេទ តម្រូវឲ្យមាន សេចក្ដី​ពិពណ៌នា
os_type string គ្មាន Filter by OS type: linux, windows
featured boolean គ្មាន Show only featured operating systems

សំណើឧទាហរណ៍

cURL
Python
JavaScript
PHP
curl -X GET "https://admin.vps.org/api/v1/operating-systems/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"
import requests

url = "https://admin.vps.org/api/v1/operating-systems/"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}

response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch('https://admin.vps.org/api/v1/operating-systems/', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  }
});

const os = await response.json();
console.log(os);
$ch = curl_init('https://admin.vps.org/api/v1/operating-systems/');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer YOUR_API_TOKEN',
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
$operating_systems = json_decode($response, true);
curl_close($ch);

ឧទាហរណ៍នៃការឆ្លើយតប

{
  "count": 12,
  "results": [
    {
      "id": 1,
      "name": "Ubuntu 22.04 LTS",
      "slug": "ubuntu-22-04",
      "version": "22.04",
      "os_type": "linux",
      "distribution": "Ubuntu",
      "architecture": "x86_64",
      "featured": true,
      "available": true,
      "min_disk_gb": 10,
      "description": "Ubuntu 22.04 LTS (Jammy Jellyfish) - Long Term Support until 2027",
      "icon_url": "https://cdn.vps.org/os-icons/ubuntu.svg"
    },
    {
      "id": 2,
      "name": "Debian 12",
      "slug": "debian-12",
      "version": "12",
      "os_type": "linux",
      "distribution": "Debian",
      "architecture": "x86_64",
      "featured": true,
      "available": true,
      "min_disk_gb": 10,
      "description": "Debian 12 (Bookworm) - Stable release",
      "icon_url": "https://cdn.vps.org/os-icons/debian.svg"
    },
    {
      "id": 3,
      "name": "CentOS Stream 9",
      "slug": "centos-stream-9",
      "version": "9",
      "os_type": "linux",
      "distribution": "CentOS",
      "architecture": "x86_64",
      "featured": false,
      "available": true,
      "min_disk_gb": 10,
      "description": "CentOS Stream 9 - Rolling release tracking RHEL development",
      "icon_url": "https://cdn.vps.org/os-icons/centos.svg"
    },
    {
      "id": 4,
      "name": "Fedora 39",
      "slug": "fedora-39",
      "version": "39",
      "os_type": "linux",
      "distribution": "Fedora",
      "architecture": "x86_64",
      "featured": false,
      "available": true,
      "min_disk_gb": 15,
      "description": "Fedora 39 - Cutting-edge Linux distribution",
      "icon_url": "https://cdn.vps.org/os-icons/fedora.svg"
    },
    {
      "id": 5,
      "name": "Rocky Linux 9",
      "slug": "rocky-linux-9",
      "version": "9",
      "os_type": "linux",
      "distribution": "Rocky Linux",
      "architecture": "x86_64",
      "featured": true,
      "available": true,
      "min_disk_gb": 10,
      "description": "Rocky Linux 9 - Enterprise-grade Linux, RHEL compatible",
      "icon_url": "https://cdn.vps.org/os-icons/rocky.svg"
    }
  ]
}

វាលឆ្លើយតប

វាល ប្រភេទ សេចក្ដី​ពិពណ៌នា
id integer Unique operating system identifier
name string Full operating system name with version
slug string URL-friendly OS identifier
version string OS version number
os_type string Operating system type: linux or windows
distribution string Distribution name (Ubuntu, Debian, CentOS, etc.)
architecture string CPU architecture (x86_64, arm64, etc.)
featured boolean Whether OS is featured/recommended
available boolean Whether OS is currently available for installation
min_disk_gb integer Minimum disk space required in gigabytes
description string Brief description of the operating system
icon_url string URL to OS icon/logo image

លេខកូដស្ថានភាពឆ្លើយតប

200 បានទាញយកបញ្ជីប្រព័ន្ធប្រតិបត្តិការដោយជោគជ័យ
401 គ្មានការអនុញ្ញាត - សញ្ញាសម្ងាត់ផ្ទៀងផ្ទាត់មិនត្រឹមត្រូវ ឬបាត់
ទទួលបាន /api/v1/operating-systems/{os_id}/

យក​សេចក្ដី​លម្អិត​ប្រព័ន្ធ​ប្រតិបត្តិការ

យក​ព័ត៌មាន​លម្អិត​អំពី​ប្រព័ន្ធ​ប្រតិបត្តិការ​ជាក់លាក់ ។

ប៉ារ៉ាម៉ែត្រផ្លូវ

ប៉ារ៉ាម៉ែត្រ ប្រភេទ តម្រូវឲ្យមាន សេចក្ដី​ពិពណ៌នា
os_id integer បាទ/ចាស៎ Unique operating system ID

សំណើឧទាហរណ៍

cURL
Python
JavaScript
curl -X GET "https://admin.vps.org/api/v1/operating-systems/1/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"
import requests

os_id = 1
url = f"https://admin.vps.org/api/v1/operating-systems/{os_id}/"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}

response = requests.get(url, headers=headers)
print(response.json())
const osId = 1;
const response = await fetch(`https://admin.vps.org/api/v1/operating-systems/${osId}/`, {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  }
});

const os = await response.json();
console.log(os);

ឧទាហរណ៍នៃការឆ្លើយតប

{
  "id": 1,
  "name": "Ubuntu 22.04 LTS",
  "slug": "ubuntu-22-04",
  "version": "22.04",
  "os_type": "linux",
  "distribution": "Ubuntu",
  "architecture": "x86_64",
  "featured": true,
  "available": true,
  "min_disk_gb": 10,
  "description": "Ubuntu 22.04 LTS (Jammy Jellyfish) - Long Term Support until 2027",
  "icon_url": "https://cdn.vps.org/os-icons/ubuntu.svg",
  "release_date": "2022-04-21",
  "support_end_date": "2027-04-21",
  "default_user": "root",
  "package_manager": "apt",
  "init_system": "systemd",
  "kernel_version": "5.15",
  "features": [
    "Long Term Support (LTS) until 2027",
    "5 years of free security updates",
    "Extended Security Maintenance available",
    "Large community support",
    "Extensive package repository",
    "Cloud-optimized kernel",
    "Regular point releases"
  ],
  "recommended_for": [
    "Web servers (Apache, Nginx)",
    "Application servers",
    "Database servers (MySQL, PostgreSQL)",
    "Docker containers",
    "Kubernetes nodes",
    "Development environments",
    "Production workloads"
  ],
  "installation_notes": [
    "Requires minimum 10GB disk space",
    "SSH enabled by default on port 22",
    "UFW firewall available but not enabled by default",
    "Automatic security updates can be configured",
    "Cloud-init supported for automated setup"
  ]
}

លេខកូដស្ថានភាពឆ្លើយតប

200 Successfully retrieved operating system details
401 គ្មានការអនុញ្ញាត - សញ្ញាសម្ងាត់ផ្ទៀងផ្ទាត់មិនត្រឹមត្រូវ ឬបាត់
404 Not Found - Operating system does not exist

Featured Operating Systems

VPS.org ផ្ដល់អនុសាសន៍ប្រព័ន្ធប្រតិបត្តិការដូចខាងក្រោមសម្រាប់ករណីប្រើភាគច្រើន:

Ubuntu 22.04 LTS
  • Best for: General purpose servers, web hosting
  • Support: Until April 2027
  • Package Manager: APT
  • Why choose: Most popular, extensive documentation, large community
Debian 12
  • Best for: Stability-focused production servers
  • Support: ~5 years
  • Package Manager: APT
  • Why choose: Rock-solid stability, security-focused
Rocky Linux 9
  • Best for: Enterprise applications, RHEL workloads
  • Support: ~10 years
  • Package Manager: DNF/YUM
  • Why choose: RHEL compatible, enterprise-grade
AlmaLinux 9
  • Best for: Enterprise servers, cPanel hosting
  • Support: ~10 years
  • Package Manager: DNF/YUM
  • Why choose: RHEL compatible, backed by CloudLinux

ការ​ជ្រើស​ប្រព័ន្ធ​ប្រតិបត្តិការ​ត្រឹមត្រូវ

តាម​ករណី​ប្រើ

ប្រើ​ករណី ប្រព័ន្ធ​ប្រតិបត្តិការ​ដែល​បាន​ផ្ដល់​អនុសាសន៍ ហេតុផល
Web Hosting Ubuntu 22.04 LTS, Debian 12 Excellent LAMP/LEMP stack support, large community
Docker/Containers Ubuntu 22.04 LTS, Debian 12 Native Docker support, optimized kernels
Enterprise Apps Rocky Linux 9, AlmaLinux 9 RHEL compatibility, long support cycles
Development Ubuntu 22.04 LTS, Fedora 39 Latest packages, developer-friendly tools
Database Servers Debian 12, Rocky Linux 9 Stability, performance, long-term support
cPanel Hosting AlmaLinux 9, Rocky Linux 9 Official cPanel support

តាម​កម្រិត​បទពិសោធន៍

ត្រូវការ​ជំនួយ​ក្នុងការ​ជ្រើស​រើស​ឬ & # 160;? ទំនាក់ទំនងក្រុមគាំទ្ររបស់យើងនៅ hello@vps.org សម្រាប់​ការ​ផ្ដល់​អនុសាសន៍​ប្រព័ន្ធ​ប្រតិបត្តិការ​ផ្ទាល់ខ្លួន​ដែល​ផ្អែក​លើ​តម្រូវការ​ជាក់លាក់​របស់​អ្នក ។

ការ​ដំឡើង និង​ការ​កំណត់​រចនាសម្ព័ន្ធ

អ្វី​ដែល​កើត​ឡើង​ក្នុង​អំឡុង​ពេល​ដំឡើង OS

  1. ការ​ជ្រើស​រូបភាព & # 160; ៖ ពុម្ព​ប្រព័ន្ធ​ប្រតិបត្តិការ​ត្រូវ​បាន​ជ្រើស​ពី​ឃ្លាំង​របស់​យើង
  2. ការ​ចែក​ថាស​ជា​ភាគ & # 160; ៖ ការ​ចែក​ជា​ភាគ​ដោយ​ស្វ័យ​ប្រវត្តិ​ផ្អែក​លើ​ទំហំ​ផែនការ
  3. ដំឡើង​មូលដ្ឋាន & # 160; ៖ កញ្ចប់​ប្រព័ន្ធ​ប្រតិបត្តិការ​ចម្បង​ត្រូវ​បាន​ដំឡើង (៥-១០ នាទី)
  4. ការ​កំណត់​រចនាសម្ព័ន្ធ​បណ្ដាញ & # 160; ៖ អាសយដ្ឋាន IP DNS និង​ផ្លូវចេញចូល​ដែល​បាន​កំណត់​រចនាសម្ព័ន្ធName
  5. ការ​កំណត់​រចនាសម្ព័ន្ធ SSH & # 160; ៖ ម៉ាស៊ីន​បម្រើ SSH បាន​អនុញ្ញាត​នៅ​លើ​ច្រក ២២
  6. ការ​ចូលដំណើរការ Root & # 160; ៖ ពាក្យ​សម្ងាត់ Root ដែល​បាន​ផ្ញើ​តាម​អ៊ីមែល
  7. កំណត់​រចនាសម្ព័ន្ធ​ពពក & # 160; ៖ ការ​កំណត់​រចនាសម្ព័ន្ធ​ដំបូង​ត្រូវ​បាន​អនុវត្ត (ប្រសិន​បើ​គាំទ្រ)

ជំហាន​បន្ទាប់​ពី​ដំឡើង

ព័ត៌មាន​ផ្ទៀងផ្ទាត់​ភាព​ត្រឹមត្រូវ​លំនាំដើម

សំខាន់ & # 160; ៖ ឯកសារ​បញ្ជាក់​របស់ Root ត្រូវ​បាន​ផ្ញើ​ទៅ​អាសយដ្ឋាន​អ៊ីមែល​ដែល​បាន​ចុះឈ្មោះ​របស់​អ្នក​ភ្លាមៗ​បន្ទាប់​ពី​បង្កើត​ម៉ាស៊ីន​បម្រើ & # 160; ។ ផ្លាស់ប្ដូរ​ពាក្យ​សម្ងាត់​លំនាំដើម​នៅ​ពេល​ចូល​ដំបូង​សម្រាប់​សុវត្ថិភាព & # 160; ។

គាំទ្រ និង​ឯកសារ

សម្រាប់ OS-ជាក់លាក់ មគ្គុទ្ទេសក៍ដំឡើង, ទស្សនារបស់យើង មជ្ឈមណ្ឌល​ឯកសារ: