Aller au contenu

eq.php

Equipment management module (eq.php): API for server deployment, power management, IPMI, backups, search, and retrieving detailed equipment configuration information.

API Methods

Method Action Description
abort_reinstall cancel reinstall Cancels the server reinstallation process, removes corresponding tags, and restores the VLAN.
add_ipmi_admin add IPMI administrator Adds an IPMI user with administrator privileges.
add_ipmi_user add IPMI user Adds an IPMI user.
announceip announce IP Announces an IP address or subnet.
backup_get_schedule get backup schedule Returns the backup schedule for the server.
backup_list list backups Returns a list of available server backups.
backup_save_schedule save backup schedule Saves the backup schedule for the server.
boot_dev boot from device Boots the server from the specified media (PXE or disk).
check_backup_lock check backup lock Checks for a lock on creating a backup.
clear_pxe clear PXE Clears the PXE configuration for the server.
create_backup create backup Initiates the creation of a server backup.
create_pxe create PXE Creates a PXE configuration for server reinstallation.
delete_backup delete backup Deletes a server backup.
deploy deploy Deploys a server by ID or preset name.
get_ipmi get IPMI Returns the IPMI address and model of the server.
get_traffic get traffic Returns IPv4 traffic data for the server.
getserversforannounce get servers for announcement Returns a list of servers available for announcement.
groups get groups Returns groups for a specific server.
hard_off hard power off Hard powers off the server.
history history Returns the server event history.
list list Returns a list of equipment based on various search criteria.
off power off Powers off the server.
on power on Powers on the server.
order_instance order and deploy server Creates an order for a new server or reinstalls an existing one. Supports selection of preset, OS, traffic, software, and promo codes. Returns a task key for status tracking.
reboot reboot Reboots the server.
reinstall reinstall Starts the server reinstallation process.
remove_ipmi_user remove IPMI user Removes an IPMI user.
request_backup_link request backup link Requests a link to download a backup.
restore_backup restore backup Restores the server from a backup.
search search Searches for equipment based on various criteria.
sensors sensors Returns server sensor data.
show show Returns data about the server and equipment.
status status Returns the server status.
suspend suspend Suspends the server.
unified_server_search unified server search Unified server search by query.
unit_reset reset IPMI Requests an IPMI server reset.
unsuspend unsuspend Removes suspension from the server.
update_servers update server list Updates the server list for a specific token.

eq/abort_reinstall

Cancels the server reinstallation process, removes corresponding tags, and restores the VLAN.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: abort_reinstall
id int 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" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"action": "abort_reinstall",
"id": 12345
}
Failure response
{
"code": -1,
"message": "invalid server id"
}

eq/add_ipmi_admin

Adds an IPMI user with administrator privileges.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: add_ipmi_admin
id int Server ID
token string Authorization token
admin_user string Username (for admins)
admin_pass string User password

Example Request

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

eq/add_ipmi_user

Adds an IPMI user.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: add_ipmi_user
id int Server ID
token string Authorization token
admin_user string Administrator username (available only to users with the admin_ipmi tag)
admin_pass string Administrator password (used only if admin_user is provided)

Example Request

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

eq/announceip

Announces an IP address or subnet.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: announceip
id int Server ID
token string Authorization token
subnet string Subnet
server string Server
subnetaddr string Subnet address
subnetaddrmask string Subnet address mask
asn string ASN
ownasn string Own ASN
annonce string Announcement
return string Return
route string Route
cmnt string Comment
ASRegistered int Checkbox: AS is registered (1 or 0)
RKPIValid int Checkbox: RKPI is valid (1 or 0)
SubNetNotSpamhaus int Checkbox: Subnet is not in Spamhaus (1 or 0)
DataIsCorrect int Checkbox: Data is correct (1 or 0)

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=announceip" \
--data "id=VALUE" \
--data "token=HOSTKEY_TOKEN" \
--data "ASRegistered=VALUE" \
--data "RKPIValid=VALUE" \
--data "SubNetNotSpamhaus=VALUE" \
--data "DataIsCorrect=VALUE"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "announceip"
}
Failure response
{
"code": -1,
"message": "invalid request"
}

eq/backup_get_schedule

Returns the backup schedule for the server.

HTTP Method: POST

Parameters:

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

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=backup_get_schedule" \
--data "id=VALUE" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "backup_get_schedule",
"schedule": {
"days": [
0,
0,
0,
0,
0,
0,
0
],
"time": "02:00",
"timezone": "Europe/Berlin"
}
}
Failure response
{
"code": -1,
"message": "invalid server id"
}

eq/backup_list

Returns a list of available server backups.

HTTP Method: POST

Parameters:

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

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=backup_list" \
--data "id=VALUE" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "backup_list",
"data": [
{
"id": 1,
"name": "backup_2023-10-01",
"size": 1024,
"date": "2023-10-01 12:00:00"
}
]
}
Failure response
{
"code": -1,
"message": "invalid server id"
}

eq/backup_save_schedule

Saves the backup schedule for the server.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: backup_save_schedule
id int Server ID
token string Authorization token
backup_schedule object Backup schedule object containing fields: days (array), time (string HH:MM), timezone (string)

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=backup_save_schedule" \
--data "id=VALUE" \
--data "token=HOSTKEY_TOKEN" \
--data "backup_schedule=VALUE"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "backup_save_schedule"
}
Failure response
{
"code": -1,
"message": "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
id int Server ID
token string Authorization token
media string Media type (e.g., PXE, disk)
boot_mode string Boot mode (uefi, legacy, auto)

Example Request

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

eq/check_backup_lock

Checks for a lock on creating a backup.

HTTP Method: POST

Parameters:

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

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=check_backup_lock" \
--data "id=VALUE" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "check_backup_lock",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response
{
"code": -1,
"message": "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 to check

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 PXE configuration for the server.

HTTP Method: POST

Parameters:

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

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=clear_pxe" \
--data "id=VALUE" \
--data "token=HOSTKEY_TOKEN"
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_backup

Initiates the creation of a server backup.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: create_backup
id int 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" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "create_backup",
"callback": "7bc29eb23fb1b879b21fce509597f07c",
"traceKey": "uuid-trace-key"
}
Failure response
{
"code": -1,
"message": "invalid server id"
}

eq/create_pxe

Creates a PXE configuration for server reinstallation.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: create_pxe
id int Server ID
token string Authorization token
os_id int Operating system ID
hostname string Hostname
root_pass string Root password
ssh_key string SSH key
post_install_script string Post-installation script
post_install_callback string Callback after installation
reinstall_key string Reinstallation key
email string Email
os_name string OS name
disk_mirror int Disk mirroring
activate_windows int Activate Windows
uefi int UEFI mode
attendedInstall int Attended installation
root_size int Root size
deploy_ticket string Deployment ticket (administrators only)
ignore_duplicated_install int Ignore duplicates (administrators only)
no_lvm int No 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 "id=VALUE" \
--data "token=HOSTKEY_TOKEN" \
--data "os_id=VALUE" \
--data "hostname=VALUE" \
--data "root_pass=VALUE"
Example of a successful response
{
"result": "OK",
"action": "create_pxe",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response
{
"code": -1,
"message": "EQ/create_pxe: invalid server id"
}

eq/delete_backup

Deletes a server backup.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: delete_backup
id int Server ID
token string Authorization token
name string Backup name

Example Request

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

eq/deploy

Deploys a server by ID or preset name.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: deploy
token string Authorization token
id int Server ID
preset string Preset name
location int Location ID
root_pass string Root password
os_id int OS ID
ssh_key string SSH key
post_install_script string Post-installation script
post_install_callback string Callback after installation
hostname string Hostname
reinstall_key string Reinstallation key
deploy_data string Billing data
deploy_options string Billing options
deploy_price string Deployment price
deploy_period string Deployment period
deploy_notify string Deployment notification
deploy_ticket string Deployment ticket
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
disk_mirror int Disk mirroring
invoice_relid int Invoice ID
activate_windows int Activate Windows
uefi int UEFI mode
attendedInstall int Attended installation
root_size int Root size
manual_choice_dsk int Manual disk selection
custom_domain string Custom domain
ipv4_amount int Number of IPv4 addresses

Example Request

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

eq/get_ipmi

Returns the IPMI address and model of the server.

HTTP Method: POST

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 POST \
--data "action=get_ipmi" \
--data "id=VALUE" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"ipmi": [
{
"IP": "192.168.1.1",
"MAC": "00:11:22:33:44:55",
"vendor": "Supermicro"
}
]
}
Failure response
{
"code": -1,
"message": "No IPMI interfaces found"
}

eq/get_traffic

Returns IPv4 traffic data for the server.

HTTP Method: POST

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" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"module": "eq",
"action": "get_traffic",
"traffic": [
{
"ip": "192.168.1.1",
"volume": 1048576,
"updated": "2023-10-27",
"billed": 1,
"direction": "out"
}
],
"id": 12345
}
Failure response
{
"code": -1,
"message": "eq/get_traffic: invalid server id"
}

eq/getserversforannounce

Returns a list of servers available for announcement.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: getserversforannounce
token string Authorization 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": true,
"mask_24": false
}
]
}
Failure response
{
"code": -2,
"message": "Authentication required"
}

eq/groups

Returns groups for a specific server.

HTTP Method: POST

Parameters:

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

Example Request

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

eq/hard_off

Hard powers off the server.

HTTP Method: POST

Parameters:

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

Example Request

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

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 of the period (YYYY-MM-DD)
date_to string End date of the period (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 equipment based on various search criteria.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: list
token string Authorization token
group string Equipment group
dc string Data center
location string Location
rack string Rack
status string Status
owner string Owner
component string Component
type string Equipment type
ip string IP address
mac string MAC address
account_id string Account ID
billing string Billing
email string Email
name_client string Client name
full int Full information
kvm string KVM
serialNumber string Serial number
id string ID

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=list" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"servers": [
{
"id": 123,
"name": "Server 1",
"status": "rent",
"location": "NL",
"project_ids": [
1,
2
]
}
]
}
Failure response
{
"code": -1,
"message": "invalid request"
}

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

Creates an order for a new server or reinstalls an existing one. Supports selection of preset, OS, traffic, software, and promo codes. Returns a task key for status tracking.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: order_instance
token string Authorization token
id int Server ID for reinstallation. If 0 or not specified — order for a new server.
preset string Preset name for ordering a new server (required if id is not specified).
root_pass string Root password. Required for new servers and reinstalls.
os_id int Operating system ID. Default is -1.
os_name string OS name (alias), if os_id is not specified.
location_name string Server location (e.g., NL, US, DE).
hostname string Server hostname.
ssh_key string SSH public key.
post_install_script string Script executed after installation.
post_install_callback string URL for callback after installation.
soft_id int Additional software ID.
traffic_plan int Traffic tariff plan ID.
ipv4_amount int Number of IPv4 addresses.
deploy_period string Billing period (monthly, quarterly, semi-annually, annually, hourly).
promocode string Promo code for discount.
custom_domain string Custom domain.
vlan string Private VLAN ID.
ip string Private IP address.
root_size int Root partition size in GB.
disk_mirror int Disk mirroring (RAID).
no_lvm string Disable LVM.
currency_code string Currency code (EUR, USD).
deploy_notify int Send deployment notifications.
deploy_comment string Order comment.
deploy_ticket string Support system ticket ID.
deploy_data string Billing data (email or invoice ID).
deploy_options string Billing options.
imitate_deploy int Simulate deployment (dry run).
imitate_error int Simulate error.
own_os int Use own OS.
jenkins_task string Jenkins task ID.
jenkins_tests int Run Jenkins tests.
activate_windows int Activate Windows.
uefi int Use UEFI.
attendedInstall int Interactive installation.
invoice_relid int Invoice RelID.
reinstall_key string Reinstallation key.
email string Client email.
cloud_init_script string Cloud-init script.
os_template string OS template.

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=order_instance" \
--data "token=HOSTKEY_TOKEN" \
--data "root_pass=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",
"invoice": 98765,
"status": "Unpaid",
"invoice_details": {
"id": 98765,
"status": "Unpaid",
"total": 150.0
}
}
Failure response

``` { "code": -1, "message": "EQ/order_instance: invalid instance name", "details": { "error": "Server not found", "id": 12345 } }

```

eq/reboot

Reboots the server.

HTTP Method: POST

Parameters:

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

Example Request

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

eq/reinstall

Starts the server reinstallation process.

HTTP Method: POST

Parameters:

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

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=reinstall" \
--data "id=VALUE" \
--data "token=HOSTKEY_TOKEN"
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 an IPMI user.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: remove_ipmi_user
id int 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" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"action": "remove_ipmi_user",
"callback": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response
{
"code": -1,
"message": "invalid server id"
}

Requests a link to download a backup.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: request_backup_link
id int Server ID
token string Authorization token
name string Backup name

Example Request

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

eq/restore_backup

Restores the server from a backup.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: restore_backup
id int Server ID
token string Authorization token
name string Backup name

Example Request

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

eq/search

Searches for equipment based on various criteria.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: search
token string Authorization token
group string Equipment group
dc string Data center
location string Location
rack string Rack
status string Status
owner string Owner
component string Component
type string Equipment type
ip string IP address
mac string MAC address
account_id string Account ID
billing string Billing
email string Email
name_client string Client name
full int Full information
kvm string KVM
serialNumber string Serial number
id string ID

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=search" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"servers": [
{
"id": 123,
"name": "Server 1",
"status": "rent",
"location": "NL"
}
]
}
Failure response
{
"code": -1,
"message": "invalid request"
}

eq/sensors

Returns server sensor data.

HTTP Method: POST

Parameters:

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

Example Request

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

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 Flag to skip PIN check (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 data about the server and equipment.

HTTP Method: POST

Parameters:

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

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=show" \
--data "id=VALUE" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"server_data": {
"id": 123,
"name": "Server 1",
"status": "rent",
"Condition_Component": "rent",
"cost_trafficIN": 0,
"limit_trafficIN": 0,
"cost_traffic": 0,
"new_limit_traffic": 0,
"limit_traffic": 0,
"account_id": 1,
"limit_bands": 0,
"due_date": "2023-12-31",
"IsShape": 0,
"last_backup": {
"date": "2023-10-01",
"size": 1024
},
"techAssigned": "",
"trafficPeriodOut": 0,
"trafficPeriodIn": 0,
"trafficPeriodOutBilling": 0,
"trafficPeriodInBilling": 0,
"datePeriod": "2023-10-01",
"hwconfig": "config_data",
"server_contacts": "",
"days_left": 30,
"project_ids": [
1,
2
],
"is_prebill": false,
"name_client": "Client Name"
},
"hardware": {
"components": [
{
"Type": "CPU",
"Count": 1,
"Cores": 8
}
],
"config": "config_data"
},
"groups": [
{
"id": 1,
"name": "Group 1"
}
],
"licenses": [
{
"id": 1,
"name": "License 1",
"amount": 1,
"date_buy": "2023-01-01"
}
],
"reinstall": "",
"location": {
"dc_location": "NL",
"location_id": 1
},
"OS": "Ubuntu 22.04",
"IP": [
{
"IP": "192.168.1.1",
"type": "public"
}
],
"interfaces": [
{
"id": 1,
"type": "eth0",
"mac": "00:00:00:00:00:00",
"upstream_id": 1,
"IsMain": true,
"IsVirt": false,
"Status": "up",
"switch_owner": "owner",
"switch_model": "model",
"port_of_virt_node": 0
}
],
"IPMI": {
"model": "Supermicro",
"interfaces": [
{
"IP": "192.168.1.2",
"MAC": "00:00:00:00:00:01"
}
],
"user": "admin",
"password": "password",
"white_ip": "192.168.1.3",
"ip_acl": "192.168.1.0/24",
"rule_id": 1
},
"tags": [
{
"tag": "next_duedate",
"value": "2023-12-31",
"internal": 0
}
],
"preset": "Preset Name",
"commitment": "12 months",
"preset_description": "Description of preset"
}
Failure response
{
"code": -1,
"message": "Nothing found for id"
}

eq/status

Returns the server status.

HTTP Method: POST

Parameters:

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

Example Request

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

eq/suspend

Suspends the server.

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": "invalid server id"
}

Unified server search 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 server reset.

HTTP Method: POST

Parameters:

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

Example Request

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

eq/unsuspend

Removes suspension from the server.

HTTP Method: POST

Parameters:

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

Example Request

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

eq/update_servers

Updates the server list for a specific token.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: update_servers
token string Authorization token

Example Request

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=update_servers" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"servers": [
123,
456
],
"billing_servers": [],
"deploy_keys": {}
}
Failure response
{
"code": -1,
"message": "Failed to retrieve servers list, billing error: "
}