Անցնել պարունակությանը

eq.php

Equipment Management Module (eq.php): API for server deployment, power management, IPMI, backups, searching, and retrieving detailed hardware configuration information.

API Methods

Method Action Description
abort_reinstall abort reinstall Terminates the server reinstallation process, removes associated tags (reinstall_start, autodeploy_start, autodeploy_timeout), and restores VLAN settings.
add_ipmi_admin add IPMI admin Creates a user with administrator privileges for management via IPMI. If the user already exists, returns their data.
add_ipmi_user add IPMI user Creates a new IPMI user for the server. If the user is an administrator, the provided credentials are used.
announceip announce IP subnet Performs announcement of the specified subnet or server to manage traffic routing.
backup_get_schedule get backup schedule Returns the current backup schedule for the specified server.
backup_list list backups Returns a list of available backups for the specified server.
backup_save_schedule save backup schedule Saves the configured backup schedule for the specified server.
boot_dev boot from media request Requests a server reboot to boot from the specified media (PXE or disk) depending on the boot mode.
check_backup_lock check backup lock Checks if the backup process is locked for the specified server.
clear_pxe clear PXE configuration Clears the current PXE configuration for the specified host.
create_backup create backup Initiates the backup creation process for the specified server. The operation is performed asynchronously.
create_pxe prepare PXE configuration for reinstallation Requests the creation of a PXE configuration for subsequent OS reinstallation on the server. Supports configuring hostname, SSH keys, and post-install scripts.
delete_backup delete backup Deletes the specified server backup by its name.
deploy deploy server Starts the deployment process of selected equipment or a preset based on provided configuration parameters.
get_ipmi get IPMI data Returns the IP address and IPMI interface model for the specified server. May contain multiple interfaces.
get_traffic get traffic data Returns IPv4 traffic usage data for the specified server.
getserversforannounce get servers for announcement Returns a list of active user servers that have passed subnet mask (mask_23/mask_24) restriction checks and are available for IP announcement.
groups get groups Returns the list of groups for a specific server.
hard_off force power off server Sends a command for forced (hard) power off of the equipment via IPMI/BMC.
history history Returns the server event history.
list list equipment Returns a list of available or rented equipment with filtering by various parameters (location, status, type, etc.).
off power off Powers off the server.
on power on Powers on the server.
order_instance order instance/reinstall Starts the deployment process of a new server from a preset or reinstallation of an existing server with OS and additional software selection.
reboot reboot server Sends a request to reboot the specified equipment via IPMI or system tools.
reinstall initialize reinstallation process Creates a key to start the server reinstallation stage and queues the task (stage: create_pxe).
remove_ipmi_user remove IPMI user Removes additional IPMI user accounts for the specified server.
request_backup_link request backup link Requests generation of a temporary link to download a server backup.
restore_backup restore from backup Starts the process of restoring the server from an existing backup by filename.
search search equipment Returns a list of available servers using various filters (group, location, status, type, etc.).
sensors get sensor data Returns sensor status data for the specified server via IPMI.
show get server data Returns detailed information about the server, including hardware (hwconfig), current status, IP addresses, interfaces, and IPMI.
status get equipment status Returns the current server status and its state data.
suspend suspend server Requests suspension (suspend) or unsuspension (unsuspend) of a VPS/server. If the action is suspend, the server will be locked.
unified_server_search unified server search Unified search for servers by query.
unit_reset reset IPMI Requests an IPMI settings reset for the specified server. If the operation requires confirmation, a callback is returned.
unsuspend unsuspend server Unlocks (unsuspends) the server if it was temporarily suspended.
update_servers update servers list Updates the list of active and pending payment servers for the user, including WHMCS status checks and prebill order processing.

eq/abort_reinstall

Terminates the server reinstallation process, removes associated tags (reinstall_start, autodeploy_start, autodeploy_timeout), and restores VLAN settings.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: abort_reinstall
id integer Server ID
token string Authorization token

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=abort_reinstall" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"action": "abort_reinstall",
"id": 123
}
Failure response

``` { "code": -1, "message": "\(module/\)action: invalid server id" }

```

eq/add_ipmi_admin

Creates a user with administrator privileges for management via IPMI. If the user already exists, returns their data.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: add_ipmi_admin
token string Authorization token
id integer Server ID
admin_user string Administrator name (if not specified, generated automatically)
admin_pass string Administrator password

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=add_ipmi_admin" \
--data "token=HOSTKEY_TOKEN" \
--data "id=12345" \
--data "admin_user=my_admin" \
--data "admin_pass=mypassword"
Example of a successful response
{
"result": "OK",
"action": "add_ipmi_admin",
"user": "uabcde123",
"password": "securePassword123!"
}
Failure response

``` { "code": -1, "message": "Add IPMI user request failed" }

```

eq/add_ipmi_user

Creates a new IPMI user for the server. If the user is an administrator, the provided credentials are used.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Action (add_ipmi_user or add_ipmi_admin)
token string Authorization token
id integer Server ID
admin_user string Administrator name (for admin rights)
admin_pass string Administrator password

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=add_ipmi_user" \
--data "token=HOSTKEY_TOKEN" \
--data "id=12345"
Example of a successful response
{
"result": "OK",
"action": "add_ipmi_user",
"callback": "string"
}
Failure response

``` { "code": -1, "message": "Add IPMI user request failed" }

```

eq/announceip

Performs announcement of the specified subnet or server to manage traffic routing.

HTTP-method: POST|GET

Parameters:

Parameter Required Type Description
id integer Equipment/server ID
token string API authentication token
subnet string Subnet to announce
server string Server for announcement
subnetaddr string Address in the subnet
subnetaddrmask string Subnet address mask
asn string|boolean Autonomous System number (or 'own')
ownasn boolean Use own ASN
annonce boolean Announcement flag
return boolean Return result
route boolean Routing flag
cmnt string Request comment
checkboxes boolean Terms confirmation (ASRegistered, RKPIValid, SubNetNotSpamhaus, DataIsCorrect)

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "id=123" \
--data "token=YOUR_TOKEN" \
--data "checkboxes=true"
Example of a successful response
{
"result": "OK",
"action": "announceip"
}
Failure response

``` { "code": -2, "message": "Authentication required" }

```

eq/backup_get_schedule

Returns the current backup schedule for the specified server.

HTTP-method: GET

Parameters:

Parameter Required Type Description
action string Method identifier: backup_get_schedule
token string Authorization token
id integer Equipment (server) ID

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X GET \
--data "action=backup_get_schedule" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"action": "backup_get_schedule",
"days": [0, 0, 0, 0, 0, 0, 0],
"time": "",
"timezone": ""
}
Failure response

``` { "code": -1, "message": "EQ/backup_get_schedule: invalid server id" }

```

eq/backup_list

Returns a list of available backups for the specified server.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: backup_list
token string Authorization token
id integer Equipment (server) ID

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=backup_list" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "backup_list",
"data": [
{
"bucket_name": "example-bucket",
"files": []
}
]
}
Failure response

``` { "code": -2, "message": "EQ: action required" }

```

eq/backup_save_schedule

Saves the configured backup schedule for the specified server.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: backup_save_schedule
token string Authorization token
id integer Equipment (server) ID
backup_schedule object Backup schedule settings array. Contains fields: days (array), time (string), timezone (string)

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=backup_save_schedule" \
--data "token=HOSTKEY_TOKEN" \
--data "id=123" \
--data "backup_schedule[days][]=monday" \
--data "backup_schedule[days][]=tuesday" \
--data "backup_schedule[time]=03:00" \
--data "backup_schedule[timezone]=UTC"
Example of a successful response
{
"result": "OK",
"action": "backup_save_schedule"
}
Failure response

``` { "code": -1, "message": "Error saving schedule or insufficient permissions" }

```

eq/boot_dev

Requests a server reboot to boot from the specified media (PXE or disk) depending on the boot mode.

HTTP-method: POST|GET

Parameters:

Parameter Required Type Description
action string Method identifier: boot_dev
token string Authorization token
id int Server ID
media string Boot media type
boot_mode string Boot mode (auto, uefi or legacy). If auto, determined automatically based on hardware configuration.

Example Request

curl -s "https://invapi.hostkey.com/eq" -X POST \
--data "action=boot_dev" \
--data "token=HOSTKEY_TOKEN" \
--data "id=123" \
--data "media=pxe" \
--data "boot_mode=uefi"
Example of a successful response
{
"result": "OK",
"action": "boot_dev",
"callback": "string"
}
Failure response

``` { "code": -1, "message": "Bootable media change request failed: [error]" }

```

eq/check_backup_lock

Checks if the backup process is locked for the specified server.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Action name: check_backup_lock
token string Authorization token
id integer Equipment (server) ID

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=check_backup_lock" \
--data "token=HOSTKEY_TOKEN" \
--data "id=123"
Example of a successful response
{
"result": "OK",
"action": "check_backup_lock",
"callback": "string"
}
Failure response

``` { "code": -1, "message": "EQ/check_backup_lock: invalid server id" }

```

eq/check_pin

Checks the PIN code for operations.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: check_pin
token string Authorization token
pin string PIN code for verification

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=check_pin" \
--data "token=HOSTKEY_TOKEN" \
--data "pin=VALUE"
Example of a successful response
{
"result": "OK",
"action": "check_pin",
"callback": "pin_disabled"
}
Failure response
{
"code": -1,
"message": "PIN validation failed"
}

eq/clear_pxe

Clears the current PXE configuration for the specified host.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: clear_pxe
token string Authorization token
id int Equipment ID
hostname string Hostname to clear

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=clear_pxe" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response

``` { "code": -1, "message": "Failed to submit clear PXE config request" }

```

eq/console

Requests the launch of the server management console via IPMI/NoVNC.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: console
token string Authorization token
id integer Server ID

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=console" \
--data "id=12345"
Example of a successful response
{
"result": "OK",
"action": "console",
"callback": "string"
}
Failure response

``` { "code": -1, "message": "Console request failed" }

```

eq/create_backup

Initiates the backup creation process for the specified server. The operation is performed asynchronously.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: create_backup
id int Equipment (server) ID
token string Authorization token

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=create_backup" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "create_backup",
"callback": "string",
"traceKey": "string"
}
Failure response

``` { "code": -1, "message": "Operation execution error or insufficient permissions" }

```

eq/create_pxe

Requests the creation of a PXE configuration for subsequent OS reinstallation on the server. Supports configuring hostname, SSH keys, and post-install scripts.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: create_pxe
token string Authorization token
id int Server ID
root_pass string Root password
os_id int Operating system ID
hostname string Hostname
ssh_key string SSH public key
post_install_script string Post-install script
post_install_callback string URL for callback notification
reinstall_key string Reinstallation key
email string User email
os_name string OS name (alias)
disk_mirror int Disk mirroring
activate_windows int Windows activation (0/1)
activation_key string Activation key
uefi int UEFI boot mode (0/1)
attendedInstall string Attended installation
root_size int Root partition size
deploy_ticket string Kayako ticket ID
ignore_duplicated_install int Ignore duplicate installations
no_lvm string Disable LVM
custom_domain string Custom domain
manual_choice_dsk int Manual disk selection

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=create_pxe" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE" \
--data "root_pass=VALUE" \
--data "os_id=VALUE"
Example of a successful response
{
"result": "OK",
"action": "create_pxe",
"callback": "string"
}
Failure response

``` { "code": -1, "message": "Create PXE config request failed: error_details" }

```

eq/delete_backup

Deletes the specified server backup by its name.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: delete_backup
token string Authorization token
id integer Equipment (server) ID
name string Backup name to delete

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=delete_backup" \
--data "token=HOSTKEY_TOKEN" \
--data "id=123" \
--data "name=my_backup_name"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "delete_backup",
"callback": "string"
}
Failure response

``` { "code": -1, "message": "Backup deletion error" }

```

eq/deploy

Starts the deployment process of selected equipment or a preset based on provided configuration parameters.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: deploy
token string Authorization token
id integer Specific server ID for deployment
preset string Preset name for deploying new equipment
location integer Location (datacenter) ID
hostname string Hostname for the server
root_pass string Root password (minimum 8 characters)
os_id integer Operating system ID
ssh_key string SSH public key
post_install_script string Post-install script
post_install_callback string URL for callback notification
deploy_data string Billing data (invoice ID or email)
deploy_options string Deployment options (for admin)
deploy_period string Payment period (hourly, quarterly, semi-annually, annually)
deploy_notify integer Notify the client?
imitate_deploy integer Simulation mode (dry run)
custom_domain string Custom domain
traffic_plan integer Traffic plan ID
disk_mirror string Disk mirroring (RAID)
deploy_comment string Deployment comment
ipv4_amount integer Number of IPv4 addresses

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=deploy" \
--data "token=YOUR_TOKEN" \
--data "root_pass=SecurePass123!" \
--data "deploy_data=INV-12345" \
--data "deploy_options=US-EAST"
Example of a successful response
{
"result": "OK",
"action": "deploy",
"callback": "7bc29eb23fb1b879b21fce509597f07c",
"ticket": "12345"
}
Failure response

``` { "code": -1, "message": "Deploy init for server 123 failed: error message" }

```

eq/get_ipmi

Returns the IP address and IPMI interface model for the specified server. May contain multiple interfaces.

HTTP-method: GET

Parameters:

Parameter Required Type Description
action string Method identifier: get_ipmi
id int Server ID
token string Authorization token

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X GET \
--data "action=get_ipmi" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"ipmi": [
{
"IP": "192.168.1.100",
"MAC": "00:1A:4C:00:11:22",
"vendor": "Dell iDRAC"
}
]
}
Failure response

``` { "code": -1, "message": "No IPMI interfaces found" }

```

eq/get_traffic

Returns IPv4 traffic usage data for the specified server.

HTTP-method: POST|GET

Parameters:

Parameter Required Type Description
action string Method identifier: get_traffic
id int Server ID
token string Authorization token

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=get_traffic" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "get_traffic",
"id": 123,
"traffic": []
}
Failure response

``` { "code": -1, "message": "\(module/\)action: invalid server id" }

```

eq/get_upgrade_key

Returns a key to perform an upgrade operation, linked to a specific invoice (invoice_id). If no tags with the key are found, an empty string is returned.

HTTP-method: POST|GET

Parameters:

Parameter Required Type Description
action string Method identifier: get_upgrade_key
token string Authorization token
invoice_id integer Invoice ID to search for the upgrade key

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=get_upgrade_key" \
--data "token=HOSTKEY_TOKEN" \
--data "invoice_id=12345"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "get_upgrade_key",
"key": ""
}
Failure response

``` { "code": -2, "message": "Authentication required" }

```

eq/getserversforannounce

Returns a list of active user servers that have passed subnet mask (mask_23/mask_24) restriction checks and are available for IP announcement.

HTTP-method: POST|GET

Parameters:

Parameter Required Type Description
action string Method identifier: getserversforannounce
token string API authentication token

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=getserversforannounce" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "getserversforannounce",
"servers": [
{
"id": 123,
"location": "NL",
"mask_23": "255.255.254.0",
"mask_24": "255.255.255.0"
}
]
}
Failure response

``` { "code": -1, "message": "EQ: action required" }

```

eq/groups

Returns the list of groups for a specific server.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: groups
id int Server ID

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=groups" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"groups": []
}
Failure response

``` { "code": -1, "message": "EQ/groups: invalid server id" }

```

eq/hard_off

Sends a command for forced (hard) power off of the equipment via IPMI/BMC.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: hard_off
token string Authorization token
id integer Server ID

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=hard_off" \
--data "token=HOSTKEY_TOKEN" \
--data "id=12345"
Example of a successful response
{
"result": "OK",
"action": "hard_off",
"callback": "string"
}
Failure response

``` { "code": -1, "message": "Stop request failed" }

```

eq/history

Returns the server event history.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: history
id int Server ID
token string Authorization token
type array<string> Filter by event types
date_from string Start date (YYYY-MM-DD)
date_to string End date (YYYY-MM-DD)

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=history" \
--data "id=VALUE" \
--data "token=HOSTKEY_TOKEN" \
--data "type[]=ACTION" \
--data "type[]=ERROR" \
--data "date_from=2023-10-01" \
--data "date_to=2023-10-31"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "history",
"id": 12345,
"history": [
{
"id": 1,
"date": "2023-10-01 12:00:00",
"message": "Server rebooted",
"type": "ACTION"
}
]
}
Failure response
{
"code": 400,
"message": "Invalid server id"
}

eq/list

Returns a list of available or rented equipment with filtering by various parameters (location, status, type, etc.).

HTTP-method: GET|POST

Parameters:

Parameter Required Type Description
action string Method identifier: list
token string Authorization token
group string[] Equipment groups (comma-separated)
dc int[] Datacenter ID
location string[] Location code (e.g., NL, US-East)
rack int[] Rack ID
status string[] Server status (rented, prepare_full, etc.)
owner string[] Equipment owner (Hostkey, colo)
component int[] Hardware component ID
type string[] Equipment type (server, switch, etc.)
ip string[] Search by IP address
mac string[] Search by MAC address
account_id int[] Billing account ID
billing string[] Billing region (en/ru)
email string[] Search by client email
name_client string[] Client name
full int Return full data (1)
kvm string[] Filter by KVM availability
serialNumber string[] Search by serial number
id int[] Equipment ID filter

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=list" \
--data "token=HOSTKEY_TOKEN" \
--data "status[]=rented" \
--data "status[]=prepare_full" \
--data "location[]=NL"
Example of a successful response
{
"result": "OK",
"servers": [
{
"id": 123,
"name_client": "John Doe",
"status": "rent",
"type": "Server",
"location": {
"dc_location": -1,
"rack_id": 564,
"rack_position": 10
},
"is_prebill": false,
"project_ids": [],
"is_prebill_rate": null,
"prebill_period": null
}
]
}
Failure response

``` { "code": -2, "message": "EQ: action required" }

```

eq/off

Powers off the server.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: off
id int Server ID
token string Authorization token

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=off" \
--data "id=VALUE" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"action": "off",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response
{
"code": -1,
"message": "EQ/off: invalid server id"
}

eq/on

Powers on the server.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: on
id int Server ID
token string Authorization token

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=on" \
--data "id=VALUE" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"action": "on",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response
{
"code": -1,
"message": "EQ/on: invalid server id"
}

eq/order_instance

Starts the deployment process of a new server from a preset or reinstallation of an existing server with OS and additional software selection.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: order_instance
token string Authorization token
id int Existing server ID for reinstallation
preset string Preset ID or name for deploying a new instance
root_pass string Root password (must not contain @ or #)
os_template string OS template for deployment from template
soft_id int Additional software ID
os_id int Operating system ID
ssh_key string SSH public key
post_install_script string Post-install script
hostname string Hostname
root_size int Root partition size (GB)
email string Email for notifications/deployment
deploy_period string Payment period (hourly, quarterly, semi-annually, annually)
ipv4_amount int Number of IPv4 addresses
custom_domain string Custom domain
vlan int Private VLAN ID
deploy_data string Deployment data (for admin)
deploy_options string Deployment options (for admin)
traffic_plan int Traffic plan ID

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=order_instance" \
--data "token=YOUR_TOKEN" \
--data "root_pass=SecurePass123!" \
--data "preset=ubuntu-docker-preset"
Example of a successful response
{
"result": "OK",
"action": "order_instance",
"callback": "7bc29eb23fb1b879b21fce509597f07c",
"deploy_status": "install",
"id": 123,
"os_name": "Ubuntu 22.04",
"soft_name": "Docker"
}
Failure response

``` { "code": -1, "message": "Reinstall init for server 123 failed: error message" }

```

eq/ovirt_novnc

Requests NoVNC console access for the server via oVirt. Requires authorization and appropriate permissions.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: ovirt_novnc
token string Authorization token
id integer Server ID
white_ip string Public IP for console access

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=ovirt_novnc" \
--data "token=YOUR_TOKEN" \
--data "id=12345" \
--data "white_ip=1.2.3.4"
Example of a successful response
{
"result": "OK",
"action": "ovirt_novnc",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response

``` { "code": -1, "message": "EQ/ovirt_novnc: invalid server id" }

```

eq/reboot

Sends a request to reboot the specified equipment via IPMI or system tools.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Action name (reboot)
token string Authorization token
id integer Equipment ID

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=reboot" \
--data "token=YOUR_TOKEN" \
--data "id=123"
Example of a successful response
{
"result": "OK",
"action": "reboot",
"callback": "string"
}
Failure response

``` { "code": -1, "message": "Reboot request failed" }

```

eq/reinstall

Creates a key to start the server reinstallation stage and queues the task (stage: create_pxe).

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Action name (reinstall)
token string Authorization token
id integer Server ID

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=reinstall" \
--data "token=YOUR_TOKEN"
--data "id=12345"
Example of a successful response
{
"result": "OK",
"action": "reinstall",
"stage": "create_pxe",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response

``` { "code": -1, "message": "EQ/reinstall: invalid server id" }

```

eq/remove_ipmi_user

Removes additional IPMI user accounts for the specified server.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: remove_ipmi_user
id integer Server ID
token string Authorization token

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=remove_ipmi_user" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"action": "remove_ipmi_user",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response

``` { "code": -1, "message": "\(module/\)action: invalid server id" }

```

Requests the generation of a temporary link to download a server backup.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Request action
token string Authorization token
id integer Equipment (server) ID
name string Backup name for the link request

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=request_backup_link" \
--data "token=HOSTKEY_TOKEN" \
--data "id=12345" \
--data "name=my_backup_name"
Example of a successful response
{
"result": "OK",
"action": "request_backup_link",
"callback": "string"
}
Failure response

``` { "code": -1, "message": "Error creating backup link request" }

```

eq/restore_backup

Starts the process of restoring the server from an existing backup by filename.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Action
token string Authorization token
id integer Equipment (server) ID
name string Backup name for restoration

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=restore_backup" \
--data "token=HOSTKEY_TOKEN" \
--data "id=12345" \
--data "name=backup_file_name"
Example of a successful response
{
"result": "OK",
"action": "restore_backup",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response

``` { "code": -1, "message": "Restore request failed" }

```

eq/search

Returns a list of available servers using various filters (group, location, status, type, etc.).

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: search
params[group] array<string> Accepts multiple values: group[]=1CPU&group[]=2CPU
params[dc] array<int> Datacenter ID
params[location] array<string> Location code (NL, US-East, etc.)
params[rack] array<string> Rack ID
params[status] array<string> Server status (rented, prepare_full, etc.)
params[owner] array<string> Owner (Hostkey, colo)
params[component] array<int> Hardware component ID
params[type] array<string> Equipment type (server, switch)
params[ip] array<string> Search by IP address
params[mac] array<string> Search by MAC address
params[account_id] array<int> Billing account ID
params[billing] array<string> Billing region (en/ru)
params[email] array<string> Search by client email
params[name_client] array<string> Client name
params[full] boolean Return full data
params[kvm] array<string> Filter by KVM availability
params[serialNumber] array<string> Search by serial number
params[id] array<int> Server ID filter
token string API authentication token

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=search" \
--data "token=HOSTKEY_TOKEN" \
--data "params[group][]=1CPU" \
--data "params[group][]=2CPU" \
--data "params[location][]=NL" \
--data "params[status][]=rented"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "search",
"servers": [
{
"id": 123,
"name_server": "srv-01",
"owner": "Hostkey",
"status": "rent",
"type": "Server",
"location": "NL",
"is_prebill": false,
"project_ids": []
}
]
}
Failure response

``` { "code": -1, "message": "EQ/search: error message" }

```

eq/sensors

Returns sensor status data for the specified server via IPMI.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: sensors
id int Equipment ID
token string Authorization token

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=sensors" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"action": "sensors",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response

``` { "code": -1, "message": "Sensors request failed" }

```

eq/set_pin

Sets the PIN code for operations.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: set_pin
token string Authorization token
new_pin string New PIN code (4-10 characters)
old_pin string Old PIN code
no_pin_req string Skip PIN check flag (true/false)

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=set_pin" \
--data "token=HOSTKEY_TOKEN" \
--data "new_pin=VALUE"
Example of a successful response
{
"result": "OK",
"action": "set_pin",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response
{
"code": -1,
"message": "invalid PIN length"
}

eq/show

Returns detailed information about the server, including hardware (hwconfig), current status, IP addresses, interfaces, and IPMI.

HTTP-method: GET

Parameters:

Parameter Required Type Description
action string Method identifier: show
id int Equipment ID
token string Authorization token

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X GET \
--data "action=show" \
--data "id=123"
Example of a successful response
{
"result": "OK",
"server_data": {
"id": 123,
"status": "rent",
"Condition_Component": "power_on",
"owner": "[email protected]",
"type_billing": "Server",
"hostname": "server-01",
"ip": [
{
"IP": "192.168.1.1",
"status": "active"
}
],
"os": {
"id": 5,
"name": "Ubuntu 22.04"
},
"location": {
"dc_location": 1,
"rack_id": 10,
"rack_position": 5
}
},
"hardware": {
"cpu": "Intel Xeon E5-2680",
"ram": 64,
"hdd": 500
},
"groups": [
{
"tag": "group_name",
"value": "1"
}
],
"licenses": [],
"reinstall": "",
"IP": [],
"interfaces": [],
"IPMI": {
"model": "Dell iDRAC",
"interfaces": []
},
"tags": [
{
"tag": "server_name",
"value": "my-server"
}
],
"preset": "",
"commitment": ""
}
Failure response

``` { "code": -1, "message": "Nothing found for 123" }

```

eq/status

Returns the current server status and its state data.

HTTP-method: POST|GET

Parameters:

Parameter Required Type Description
action string Action name (status)
token string Authorization token
id int Server ID

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=status" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"action": "status",
"callback": "string"
}
Failure response

``` { "code": -1, "message": "Status request failed" }

```

eq/status_check

Performs a check of the current equipment state (statuses) through internal system mechanisms.

HTTP-method: POST

Parameters:

Parameter Required Type Description
token string Authorization token

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"data": [
"User @login changed [Owner Status Type Location](link)'s status `old` -> `new` for [ticket](link) 5 days ago: desc"
]
}
Failure response

``` { "code": -2, "message": "Authentication required" }

```

eq/suspend

Requests suspension (suspend) or unsuspension (unsuspend) of a VPS/server. If the action is suspend, the server will be locked.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: suspend
id int Server ID
token string Authorization token

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=suspend" \
--data "id=VALUE"
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"action": "suspend",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response

``` { "code": -1, "message": "Suspend request failed" }

```

eq/traffic_add

Creates an invoice for additional outbound traffic for the server. After payment, the limit will be increased.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: traffic_add
id int Equipment (server) ID
new_limit int New traffic limit in TB
token string API authentication token

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=traffic_add" \
--data "id=VALUE"
--data "new_limit=VALUE"
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "traffic_add",
"invoice": 12345,
"status": "Unpaid"
}
Failure response

``` { "code": -1, "message": "EQ/traffic_add: invalid new_limit" }

```

Unified search for servers by query.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: unified_server_search
token string Authorization token
query string Search query (string or numeric ID)

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=unified_server_search" \
--data "token=HOSTKEY_TOKEN" \
--data "query=VALUE"
Example of a successful response
{
"result": "OK",
"results": {
"servers": [
{
"id": 123,
"name": "Server 1",
"owner": "[email protected]",
"status": "rent",
"billing": "en",
"type": "server"
}
]
},
"limited": {
"servers": false
},
"category": "servers"
}
Failure response
{
"code": -2,
"message": "Authentication required"
}

eq/unit_reset

Requests an IPMI settings reset for the specified server. If the operation requires confirmation, a callback is returned.

HTTP-method: POST

Parameters:

Parameter Required Type Description
id int Equipment (server) ID
token string Authorization token

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"action": "unit_reset",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response

``` { "code": -1, "message": "IPMI unit reset request failed: error_details" }

```

eq/unsuspend

Unlocks (unsuspends) the server if it was temporarily suspended.

HTTP-method: POST

Parameters:

Parameter Required Type Description
id int Server ID
token string Authorization token

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"action": "unsuspend",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response

``` { "code": -1, "message": "Unsuspend request failed" }

```

eq/update_servers

Updates the list of active and pending payment servers for the user, including WHMCS status checks and prebill order processing.

HTTP-method: POST

Parameters:

Parameter Required Type Description
token string API authentication token
servers[] array<int> List of server IDs for synchronization
show_products int Flag to display user products
load_servers_only string If 'true', only server IDs are loaded (without IP)

Example Request

``` curl -s "https://invapi.hostkey.com/eq.php" -X POST \ --data "token=HOSTKEY_TOKEN" \ --data "servers[]=101" \ --data "servers[]=102"

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