Aller au contenu

software.php

Software Management Module: provides methods for retrieving a list of available software with filtering by server characteristics or presets, 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 promotional offers.

software/list

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

HTTP Method: POST

Parameters:

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

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"
      }
    ],
    "USD_rate": 92.5
  },
  {
    "id": 102,
    "name": "Ubuntu 22.04 LTS",
    "active": 1,
    "price": 0.0,
    "tags": [
      {
        "tag": "os",
        "value": "linux"
      }
    ],
    "USD_rate": 92.5
  }
],
"debug": [],
"debug_licensed_soft": {}
}
Failure response
{
"code": -1,
"message": "soft/list: no software found"
}