Skip to content

os.php

Operating Systems Management Module: provides methods for adding, removing, updating, and retrieving a list of operating systems with filtering by hardware compatibility and licenses.

API Methods

Method Action Description
list get list of operating systems Returns a list of available operating systems filtered by hardware type (VM, BM, GPU), licenses, and location. Supports filtering for a specific server or preset.

os/list

Returns a list of available operating systems filtered by hardware type (VM, BM, GPU), licenses, and location. Supports filtering for a specific server or preset.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: list
token string Authorization token for accessing protected methods
id int Server ID for filtering compatible OS
instance_id int Preset ID for filtering compatible OS
location string Location code for filtering
user_location string Default user location (COM)
bill_period string Billing period (monthly, hourly)

Example Request

curl -s "https://api.hostkey.com/os.php" -X POST \
--data "action=list"
Example of a successful response
{
"result": "OK",
"action": "list",
"os_list": [
  {
    "id": 101,
    "name": "Ubuntu 22.04 LTS",
    "active": 1,
    "tags": [
      {
        "tag": "uefi",
        "value": "true"
      },
      {
        "tag": "vm",
        "value": "true"
      }
    ],
    "price_EUR": 0.0,
    "price_RUB": 0.0,
    "location": "NL",
    "billing_plan": "monthly",
    "cores": 2,
    "ram": 4096,
    "hdd": 80,
    "cpu_sockets": 1,
    "bm": 0,
    "gpu": 0,
    "vds": 0,
    "vgpu": 0
  },
  {
    "id": 102,
    "name": "Windows Server 2022",
    "active": 1,
    "tags": [
      {
        "tag": "uefi",
        "value": "true"
      },
      {
        "tag": "license",
        "value": "required"
      }
    ],
    "price_EUR": 15.0,
    "price_RUB": 1500.0,
    "location": "DE",
    "billing_plan": "monthly",
    "cores": 4,
    "ram": 8192,
    "hdd": 160,
    "cpu_sockets": 1,
    "bm": 1,
    "gpu": 0,
    "vds": 0,
    "vgpu": 0
  }
]
}
Failure response
{
"code": -1,
"message": "no OS found"
}

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×