Skip to content

options.php

Options management module for binding licenses or software to servers and retrieving historical logs.

API Methods

Method Action Description
bind get bind Binds a specific option (e.g., license) to a server or an IP address.
history get history Retrieves the history of changes for a specific component.
logs get logs Retrieves logs for a specific software option.

options/bind

Binds a specific option (e.g., license) to a server or an IP address.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: bind
token ✅ string Authentication token.
option_id ❌ integer ID of the option to bind.
id ✅ integer Server ID or IP address (if used for license binding).
option_count ❌ integer Number of options to bind. Default is 1.
ip ❌ integer IP address used for binding if option is license.
bind ✅ string Binding type (e.g., ip or server).
server_id ❌ integer Server ID assigned during binding.
eq ❌ string Equipment ID used for binding.
bm ❌ integer Flag indicating if the equipment is a Server.
vm ❌ integer Flag indicating if the equipment is a VPS.
option ❌ string The specific option type to be bound, such as license.

Request example

curl -s "https://invapi.hostkey.com/options.php" -X POST \
--data "action=bind" \
--data "token=HOSTKEY_TOKEN" \
--data "id=123" \
--data "bind=server"
Success response example
{
"list": {},
"license_result": {
"status": "success",
"key": "XXXX-XXXX-XXXX"
},
"debug": {
"id": 10,
"name": "License Key"
}
}
Error examples
{
"code": -1,
"message": "bind: failed to list option license: error message while ..."
}

options/history

Retrieves the history of changes for a specific component.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: history
token ✅ string Authentication token.
id ✅ integer ID of the object to get history for.
component ❌ string The component type. Allowed values: api_keys, cl, component1, cust, customers, dash, dash-rep, dashboard, dashboards, datacenter, dc, distributors, empl, employee1, employees, eq, hardware, ip, ipaddress, ipadress2, ipmip, ipv4r, ipv4rs, iso, iso-image, iso-images, iso_list, lic, license, loc, location, locations, ma, net, netinterface, netinterface1, part, pdns-domain, pdns-subdomain, preorders, rack, rack1, rep, reporttemplate, rh_requests, rhr, rhrequests, sshkey, sshkeys, sup, tags_mgr, tm, vlan, vlans, waybills, waybills_hardware, wb, wbd
option ❌ string The specific component or category for filtering history logs.

Request example

curl -s "https://invapi.hostkey.com/options.php" -X POST \
--data "action=history" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE"
Success response example
{
"result": "OK",
"action": "history",
"data": [
{
"id": 1,
"message": "Software updated: name = new_name, status = active",
"created_at": "2024-01-01T12:00:00Z"
}
]
}
Error examples
{
"code": -1,
"message": "Error description"
}

options/logs

Retrieves logs for a specific software option.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: logs
token ✅ string Authentication token.
id ✅ integer ID of the software option.
option ✅ string The specific software option for which logs are being retrieved.

Request example

curl -s "https://invapi.hostkey.com/options.php" -X POST \
--data "action=logs" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE" \
--data "option=VALUE"
Success response example
{
"logs": [
{
"id": 1,
"message": "Action performed at 2024-01-01",
"timestamp": "2024-01-01T10:00:00Z"
}
]
}
Error examples
{
"code": 400,
"message": "logs action is only supported for software option"
}
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×