Skip to content

eq_callback.php

Module for processing asynchronous responses from workers to manage hardware (EQ) and virtual machines. It processes task statuses (deploy, reinstall, backup, network), updates billing, and sends notifications to customers.

API Methods

Method Action Description
check check job status Checks the current status of an asynchronous job using a unique key. Returns job scope, context, and debug information.
reinstall callback receiver for reinstall actions Processes callback signals from workers regarding server reinstallation tasks. It handles status updates (done, stage, failure), manages deployment logs, notifies customers via email/Kayako, and performs post-reinstall cleanup such as updating billing links or resetting network interfaces.

eq_callback/check

Checks the current status of an asynchronous job using a unique key. Returns job scope, context, and debug information.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string The action to perform (e.g., check)
key string 32-character alphanumeric async job key

Example Request

curl -s "https://invapi.hostkey.com/eq_callback.php" -X POST \
--data "action=check" \
--data "key=a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
Example of a successful response
{
"result": "OK",
"action": "check",
"scope": {
"id": 123,
"location": "NL"
},
"context": {
"action": "deploy",
"id": 123,
"ip": "1.2.3.4"
},
"debug": "Job processed successfully",
"key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
}
Failure response
{
"code": -1,
"message": "AsyncKey a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6 not found"
}

eq_callback/reinstall

Processes callback signals from workers regarding server reinstallation tasks. It handles status updates (done, stage, failure), manages deployment logs, notifies customers via email/Kayako, and performs post-reinstall cleanup such as updating billing links or resetting network interfaces.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string The action being performed (e.g., reinstall)
key string 32-character alphanumeric async job key
status string Status received from the worker (e.g., OK, Error, Stage)

Example Request

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

``` { "code": -1, "message": "Key not found" }

```

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