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
Example of a successful response
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
Example of a successful response
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
Example of a successful response
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 |
| ❌ | 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
Example of a successful response
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
Example of a successful response
Failure response
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
Example of a successful response
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
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
Example of a successful response
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 |
| ❌ | 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
Example of a successful response
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
Example of a successful response
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
Example of a successful response
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 |
| ❌ | 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
Example of a successful response
Failure response
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
Example of a successful response
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
Example of a successful response
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
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": ""
}
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
Example of a successful response
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
Example of a successful response
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
Example of a successful response
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
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"
}
}