Ana içeriğe geç

software.php

Software management module: provides methods to get a list of available software filtered by server characteristics or preset, as well as selecting compatible presets and operating systems for specific software.

API Methods

Method Action Description
list get software list Returns a list of software suitable for a specific server (id) or preset (instance_id), taking into account licenses, hardware specifications, and promotions.

software/list

Returns a list of software suitable for a specific server (id) or preset (instance_id), taking into account licenses, hardware specifications, and promotions.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: list
token string Authorization token for API access
id int Server ID to find compatible software
instance_id int Preset ID to find compatible software
bill_period string Billing period (monthly, hourly)
user_location string User location (e.g., US, EU)

Example Request

curl -s "https://invapi.hostkey.com/software.php" -X POST \
--data "action=list" \
--data "token=HOSTKEY_TOKEN" \
--data "id=12345" \
--data "bill_period=monthly" \
--data "user_location=US"
Example of a successful response
{
"result": "OK",
"action": "list",
"software": [
  {
    "id": 101,
    "name": "Windows Server 2022",
    "active": 1,
    "price": 45.0,
    "tags": [
      {
        "tag": "os",
        "value": "windows"
      },
      {
        "tag": "license",
        "value": "commercial"
      }
    ],
    "RUR_rate": 92.5
  },
  {
    "id": 102,
    "name": "Ubuntu 22.04 LTS",
    "active": 1,
    "price": 0.0,
    "tags": [
      {
        "tag": "os",
        "value": "linux"
      }
    ],
    "RUR_rate": 92.5
  }
],
"debug": [],
"debug_licensed_soft": {}
}
Failure response
{
"code": -1,
"message": "soft/list: no software found"
}