Անցնել պարունակությանը

eq_callback.php

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

API Methods

Method Action Description
check check task status Returns the current execution status of an asynchronous task (done, stage, failure) and the execution context.
reinstall reinstall server Processes the completion of a server reinstall process, updates statuses in billing, and notifies the customer.

eq_callback/check

Returns the current execution status of an asynchronous task (done, stage, failure) and the execution context.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Action. To get task status, it must be check
key string 32-character alphanumeric asynchronous task key

Example Request

curl -s "https://invapi.hostkey.com/eq_callback" -X POST \
--data "action=check" \
--data "key=abc123def456ghi789jklmno0pqrstuvw"
Example of a successful response
{
"result": "OK",
"action": "check",
"scope": {
"id": 123,
"location": "NL",
"ip": "1.2.3.4"
},
"context": {
"action": "deploy_vm",
"id": 5678,
"location": "COM",
"ip": "192.168.1.1"
},
"debug": "some debug info",
"key": "abc123def456ghi789jklmno0pqrstuvw"
}
Failure response

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

```

eq_callback/reinstall

Processes the completion of a server reinstall process, updates statuses in billing, and notifies the customer.

HTTP-method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: reinstall
key string Unique asynchronous task key (32 characters)
status string Execution status from the worker

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": "7bc29eb23fb1b879b21fce509597f07c"
}
Failure response

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

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