Skip to content

eq.php

Equipment management module (eq.php) for server operations: ordering, deployment, rebooting, power management, IPMI, backups, and monitoring.

API Methods

Method Action Description
add_ipmi_user add IPMI user Adds an IPMI user for the specified server. Generates a random login and password if not provided by the administrator.
boot_dev boot from device Boots the server from the specified media (PXE or disk).
clear_pxe clear PXE configuration Clears the PXE configuration for the specified host.
create_pxe create PXE configuration Requests a server reinstall via PXE.
list get equipment list Returns a list of available equipment based on various search criteria.
novnc request NoVNC console Requests access to the server's NoVNC console.
off power off server Requests to power off the server.
on power on server Requests to power on the server (reboot/power on).
order_instance order server instance Orders a new server or reinstalls an existing one.
reboot reboot server Requests to reboot the server.
recreate_novnc recreate NoVNC console Recreates the NoVNC console for the callback mechanism.
reinstall request reinstall Requests a server reinstall (reinstall) via the order_instance method.
remove_ipmi_user remove IPMI user Removes additional IPMI users.
sensors get sensor data Retrieves sensor data from the server.
show show server data Returns data about the server and equipment.
status get server status Retrieves the server status by ID.
stop_novnc stop NoVNC console Stops the NoVNC console.
unit_reset reset IPMI Requests an IPMI reset for the server.
update_servers update server list Updates the list of active servers for the current token by checking statuses in billing and adding new servers to the session.

eq/add_ipmi_user

Adds an IPMI user for the specified server. Generates a random login and password if not provided by the administrator.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: add_ipmi_user
token string Authorization token
id int Server ID
admin_user string Username for administrators (if the admin_ipmi tag exists)
admin_pass string Password for the administrator (if admin_user is specified)

Example Request

curl -s "https://api.hostkey.com/eq.php" -X POST \
--data "action=add_ipmi_user" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"action": "add_ipmi_user",
"user": "u1a2b3c",
"password": "Ab1Cd2Ef3Gh4Ij5K"
}
Failure response
{
"code": -1,
"message": "EQ/add_ipmi_user: invalid server id"
}

eq/boot_dev

Boots the server from the specified media (PXE or disk).

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: boot_dev
token string Authorization token
id int Server ID
media string Media type (pxe, disk)
boot_mode string Boot mode (uefi, legacy, auto)

Example Request

curl -s "https://api.hostkey.com/eq.php" -X POST \
--data "action=boot_dev" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE" \
--data "media=VALUE"
Example of a successful response
{
"result": "OK",
"action": "boot_dev",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response
{
"code": -1,
"message": "Bootable media change request failed"
}

eq/clear_pxe

Clears the PXE configuration for the specified server, allowing the deployment process to be restarted.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: clear_pxe
token string Authorization token for API access.
id int Unique server ID for which PXE clearing is required.
hostname string Server hostname (optional, used for validation or logging).

Example Request

curl -s "https://api.hostkey.com/eq.php" -X POST \
--data "action=clear_pxe" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"action": "clear_pxe",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response
{
"code": -1,
"message": "Failed to submit clear PXE config request"
}

eq/create_pxe

Requests a server reinstall via PXE.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: create_pxe
token string Authorization token
id int Server ID
os_id int Operating system ID
os_name string OS name (if os_id is not specified)
root_pass string Root password
hostname string Hostname (default is server ID)
ssh_key string SSH key
post_install_script string Post-installation script
post_install_callback string URL for callback after installation
disk_mirror int Disk mirroring type
uefi int Use UEFI (0/1)
root_size int Root partition size
custom_domain string Custom domain
deploy_ticket string Ticket ID for deployment
manual_choice_dsk int Manual disk selection
cloud_init_script string Cloud-init script
reinstall_key string Reinstall key
email string Email for notifications
deploy_data string Deployment data
deploy_options string Deployment options
deploy_period string Deployment period
deploy_price int Deployment price
deploy_notify int Deployment notification
deploy_comment string Deployment comment
imitate_deploy int Simulate deployment
imitate_error int Simulate error
own_os int Own OS
jenkins_task string Jenkins task
jenkins_tests int Jenkins tests
traffic_plan int Traffic plan
location_name string Location name
invoice_relid int Invoice ID
activate_windows int Activate Windows
attendedInstall int Attended installer
option int Server option
value int Option value
params array<array> Additional parameters
config int Server configuration
server_name string Server name
log_line string Log line
kvm string KVM
white_ip string Whitelisted IP
name string Name
description string Description
size string Size
groups array<array> Groups
rack string Rack
rack_position int Position in rack
ip string IP address
promocode string Promo code
full int Full mode
vlan string VLAN
key string Key
new_id int New ID
new_interface_id int New interface ID
dont_move_ip int Do not move IP
map_interface int Interface map
free_ips int Free IPs
create_kayako_ticket int Create Kayako ticket
kayako_ticket_text string Kayako ticket text
ticket string Ticket
limit int Limit
no_lvm string Without LVM
tags_replace_confirmed int Tag replacement confirmation
ipv4_amount int IPv4 count
currency_code string Currency code

Example Request

curl -s "https://api.hostkey.com/eq.php" -X POST \
--data "action=create_pxe" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE" \
--data "os_id=VALUE" \
--data "root_pass=VALUE"
Example of a successful response
{
"result": "OK",
"action": "create_pxe",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response
{
"code": -1,
"message": "Create PXE config request failed"
}

eq/list

Returns a list of available equipment based on various search criteria.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: list
token string Authorization token
id int Server ID for filtering
location int Location ID (integer)
full int Return full data (1/0)
type string Equipment type
group string Equipment group
status string Equipment status
ip string IP address for search

Example Request

curl -s "https://api.hostkey.com/eq.php" -X POST \
--data "action=list" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "list",
"servers": [
  {
    "id": 12345,
    "name": "server-01",
    "status": "rent",
    "location": "NL",
    "ip": "192.168.1.1",
    "type": "Server"
  }
]
}
Failure response
{
"code": -2,
"message": "Authentication required",
"description": "Token missing or invalid"
}

eq/novnc

Initializes a connection to the NoVNC console for the specified server. Returns a key to track the operation status.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: novnc
token string Authorization token
id int Server ID
white_ip string IP address for whitelist (optional)

Example Request

curl -s "https://api.hostkey.com/eq.php" -X POST \
--data "action=novnc" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"action": "novnc",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response
{
"code": -1,
"message": "NoVNC console request failed"
}

eq/off

Requests to power off the server.

HTTP Method: POST

Parameters:

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

Example Request

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

eq/on

Sends a command to power on the server by the specified ID. Requires token validation and access rights check.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: on
token string Authorization token for access rights verification.
id int Unique server ID for startup.

Example Request

curl -s "https://api.hostkey.com/eq.php" -X POST \
--data "action=on" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"action": "on",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response
{
"code": -1,
"message": "Start request failed: Server is locked or invalid ID"
}

eq/order_instance

Orders a new server or reinstalls an existing one.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: order_instance
token string Authorization token
id int Server ID (for reinstall)
preset string Preset name
location_name string Location name
root_pass string Root password
os_id int Operating system ID
os_name string OS name
ssh_key string SSH key
hostname string Hostname
deploy_period string Billing period
traffic_plan int Traffic plan ID
ipv4_amount int Number of IPv4 addresses
soft_id int Additional software ID
promocode string Promo code
custom_domain string Custom domain
os_template string OS template
currency_code string Currency code
vlan string Private VLAN ID
deploy_data string Deployment data (email or invoice id)
deploy_options string Deployment options
deploy_notify int Notification flag
deploy_ticket string Kayako ticket ID
deploy_comment string Deployment comment
imitate_deploy int Simulate deployment
imitate_error int Simulate error
own_os int Own OS
jenkins_task string Jenkins task
jenkins_tests int Jenkins tests
disk_mirror int Disk mirroring
root_size int Root partition size
email string Client email
post_install_script string Post-installation script
post_install_callback string Callback after installation
reinstall_key string Reinstall key
uefi int UEFI flag
attendedInstall int Attended install flag
activate_windows int Activate Windows
invoice_relid int Invoice relid
cloud_init_script string Cloud-init script
no_lvm string Disable LVM
ip string Private IP
deploy_price string Deployment price

Example Request

curl -s "https://api.hostkey.com/eq.php" -X POST \
--data "action=order_instance" \
--data "token=HOSTKEY_TOKEN" \
--data "location_name=VALUE" \
--data "root_pass=VALUE" \
--data "os_id=VALUE"
Example of a successful response
{
"result": "OK",
"action": "order_instance",
"callback": "7bc29eb23fb1b879b21fce509597f07c",
"deploy_status": "install",
"id": 12345,
"os_name": "Ubuntu 22.04",
"soft_name": "cPanel"
}
Failure response
{
"code": -1,
"message": "OS is not compatible with preset"
}

eq/reboot

Requests to reboot the server.

HTTP Method: POST

Parameters:

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

Example Request

curl -s "https://api.hostkey.com/eq.php" -X POST \
--data "action=reboot" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"action": "reboot",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response
{
"code": -1,
"message": "Reboot request failed"
}

eq/recreate_novnc

Recreates the NoVNC console for the callback mechanism.

HTTP Method: POST

Parameters:

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

Example Request

curl -s "https://api.hostkey.com/eq.php" -X POST \
--data "action=recreate_novnc" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"action": "recreate_novnc",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response
{
"code": -1,
"message": "NoVNC recreate console request failed"
}

eq/reinstall

Requests a server reinstall (reinstall) via the order_instance method.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: reinstall
token string Authorization token
id int Server ID for reinstall
os_id int Operating system ID
root_pass string Root password (minimum 8 characters, uppercase, digit, special character)
ssh_key string SSH key for access
post_install_script string Post-installation script
post_install_callback string URL for callback after installation
hostname string Server hostname
reinstall_key string Reinstall key
email string Email for notifications
deploy_data string Deployment data
deploy_notify int Deployment notification flag
deploy_options string Deployment options
deploy_period string Deployment period
deploy_price int Deployment price
deploy_ticket string Ticket ID for deployment
deploy_comment string Deployment comment
imitate_deploy int Simulate deployment
imitate_error int Simulate error
os_name string OS name
own_os int Own OS flag
jenkins_task string Jenkins task
jenkins_tests int Jenkins tests
traffic_plan int Traffic plan
disk_mirror string Disk mirroring
location_name string Location name
invoice_relid int Invoice ID
activate_windows int Activate Windows
uefi string UEFI flag
attendedInstall string attendedInstall flag
option string Server option
value string Option value
params array<array> Additional parameters
config string Server configuration
server_name string Server name
log_line string Log line
kvm string KVM access
white_ip string Whitelisted IP
name string Name
description string Description
size string Size
groups array<array> Groups
rack string Rack
rack_position int Position in rack
ip string IP address
promocode string Promo code
full string Full reinstall
type string Type
manual_choice_dsk string Manual disk selection
vlan string VLAN
key string Key
new_id int New ID
new_interface_id int New interface ID
dont_move_ip int Do not move IP
map_interface int Interface map
free_ips int Free IPs
create_kayako_ticket int Create Kayako ticket
kayako_ticket_text string Kayako ticket text
ticket string Ticket
limit int Limit
no_lvm string Without LVM
tags_replace_confirmed int Tag replacement confirmation
ipv4_amount int IPv4 count
currency_code string Currency code
custom_domain string Custom domain
os_template string OS template
soft_id int Software ID
root_size int Root partition size
cloud_init_script string Cloud-init script

Example Request

curl -s "https://api.hostkey.com/eq.php" -X POST \
--data "action=reinstall" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE" \
--data "os_id=VALUE" \
--data "root_pass=VALUE"
Example of a successful response
{
"result": "OK",
"action": "order_instance",
"callback": "7bc29eb23fb1b879b21fce509597f07c",
"deploy_status": "reinstall",
"id": 12345,
"os_name": "Ubuntu 20.04",
"soft_name": "MySQL"
}
Failure response
{
"code": -1,
"message": "Reinstall already underway for $id. Please try again shortly."
}

eq/remove_ipmi_user

Removes additional IPMI users.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: remove_ipmi_user
token string Authorization token
id int Server ID
username string IPMI username to remove

Example Request

curl -s "https://api.hostkey.com/eq.php" -X POST \
--data "action=remove_ipmi_user" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE" \
--data "username=VALUE"
Example of a successful response
{
"result": "OK",
"action": "remove_ipmi_user",
"id": 12345,
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response
{
"code": -1,
"message": "Remove IPMI user request failed"
}

eq/sensors

Requests current sensor readings (temperature, voltage, RPM) for the specified server.

HTTP Method: POST

Parameters:

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

Example Request

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

eq/show

Returns data about the server and equipment.

HTTP Method: GET

Parameters:

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

Example Request

curl -s "https://api.hostkey.com/eq.php" -X GET \
--data "action=show" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "show",
"server_data": {
  "id": 12345,
  "name": "server-01",
  "status": "rent",
  "location": "NL",
  "ip": "192.168.1.1",
  "type": "Server"
},
"hardware": {
  "components": [
    {
      "Type": "CPU",
      "Name": "Intel Xeon",
      "Cores": 16
    }
  ]
},
"groups": [
  {
    "id": 1,
    "name": "Group 1"
  }
],
"licenses": [],
"reinstall": "",
"location": {
  "dc_name": "Datacenter 1",
  "rack_name": "Rack 1"
},
"OS": {
  "id": 10,
  "name": "Ubuntu 22.04"
},
"IP": [
  {
    "IP": "192.168.1.1",
    "type": "public"
  }
],
"interfaces": [
  {
    "id": 1,
    "type": "eth0",
    "mac": "00:11:22:33:44:55"
  }
],
"IPMI": {
  "model": "Supermicro",
  "interfaces": [
    {
      "IP": "192.168.1.100",
      "MAC": "00:11:22:33:44:56"
    }
  ]
},
"tags": [
  {
    "tag": "preset",
    "value": "preset-01"
  }
],
"preset": "preset-01",
"commitment": ""
}
Failure response
{
"code": -1,
"message": "Nothing found for id"
}

eq/status

Retrieves the server status by ID.

HTTP Method: GET

Parameters:

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

Example Request

curl -s "https://api.hostkey.com/eq.php" -X GET \
--data "action=status" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "status",
"status": "active",
"server_id": 12345,
"hostname": "server.example.com",
"ip": "192.168.1.1",
"os": "Ubuntu 22.04",
"ram": 16,
"cpu": 4,
"disk": 100
}
Failure response
{
"code": -1,
"message": "incorrect server id"
}

eq/stop_novnc

Terminates the NoVNC console session for the specified server.

HTTP Method: POST

Parameters:

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

Example Request

curl -s "https://api.hostkey.com/eq.php" -X POST \
--data "action=stop_novnc" \
--data "token=HOSTKEY_TOKEN" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"action": "stop_novnc",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response
{
"code": -1,
"message": "NoVNC console terminate request failed"
}

eq/unit_reset

Requests an IPMI reset for the server.

HTTP Method: POST

Parameters:

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

Example Request

curl -s "https://api.hostkey.com/eq.php" -X POST \
--data "action=unit_reset" \
--data "token=HOSTKEY_TOKEN" \
--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"
}

eq/update_servers

Updates the list of active servers for the current token by checking statuses in billing and adding new servers to the session.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: update_servers
token string Authorization token for access rights verification

Example Request

curl -s "https://api.hostkey.com/eq.php" -X POST \
--data "action=update_servers" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"servers": [
  12345,
  12346
],
"billing_servers": [
  {
    "id": 999,
    "config": "json_config_string",
    "status": "Pending payment",
    "regdate": "2023-10-25",
    "name": "Server Name",
    "recurring": 1,
    "nextduedate": "2023-11-25",
    "billingcycle": "Monthly"
  }
],
"deploy_keys": {
  "12345": "abc123def456"
}
}
Failure response
{
"code": -1,
"message": "No active servers were found for this account",
"no_servers": 1
}

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