Skip to content

eq_callback.php

Module for processing asynchronous callbacks from worker tasks for managing hardware, servers, and virtual machines. Handles task execution statuses (deploy, reinstall, backup, network operations) and synchronizes them with billing and event history.

API Methods

Method Action Description
check check async task status Checks the current status of an asynchronous task by key and returns the execution result, context, and debug information.

eq_callback/check

Checks the current status of an asynchronous task by key and returns the execution result, context, and debug information.

HTTP Method: GET

Parameters:

Parameter Required Type Description
action string Method identifier: check
key string Unique identifier of the asynchronous task (32 characters, a-z0-9 only).
status string Task status (optional, used for logging).
stage string Task execution stage (default is 'done').
id integer Server or entity identifier.

Example Request

curl -s "https://api.hostkey.com/eq_callback.php" -X GET \
--data "action=check" \
--data "key=VALUE"
Example of a successful response
{
"result": "OK",
"action": "check",
"scope": {
  "id": 12345,
  "location": "NL",
  "preset": "vps-2c-4gb",
  "ip": "192.168.1.100",
  "os": "Ubuntu 22.04",
  "status": "deploy_done"
},
"context": {
  "action": "deploy",
  "id": 12345,
  "location": "NL",
  "ip": "192.168.1.100",
  "ip_ipmi": "192.168.1.101",
  "interface_id": 5678,
  "sw_id": 9012,
  "port": "eth0",
  "User": "admin",
  "password": "censored"
},
"debug": "Task completed successfully. Server deployed.",
"key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
}
Failure response
{
"code": -1,
"message": "AsyncKey not found",
"key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
}

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