Skip to content

rhr.php

Remote Hands Requests Management Module: creation, filtering, status updates, and communication regarding requests.

API Methods

Method Action Description
add create a request Creates a new Remote Hands Request (RHR). Supports KVM, UNBLOCK, or SERVICE types. If the client is a customer, emoji are not allowed in the request text.
chat send a chat message to an RHR request Sends a new message to an existing Remote Hands Request, updates the conversation history, and optionally creates support tickets or media attachments.
discard discard request Discards a specific Remote Hands Request by ID. If a response is provided, it is logged in the request history.
list get list of RHR requests Returns a list of Remote Hands Requests (RHR) based on filters like location, status, and date range. If the user is a customer, it also includes historical logs related to these requests.

rhr/add

Creates a new Remote Hands Request (RHR). Supports KVM, UNBLOCK, or SERVICE types. If the client is a customer, emoji are not allowed in the request text.

HTTP Method: POST

Parameters:

Parameter Required Type Description
token string Authentication token
ip string Client IP address
eq_id int Equipment ID
params[type] string Type of request (e.g., KVM, UNBLOCK). If not one of these, defaults to SERVICE.
params[request] string Detailed description of the request. Emojis are prohibited for customers.
params[request_origin] string Origin of the request (e.g., CLIENT). Required if not a customer.

Example Request

curl -s "https://invapi.hostkey.com/rhr.php" -X POST \
--data "token=VALUE" \
--data "ip=VALUE" \
--data "eq_id=VALUE" \
--data "params[type]=VALUE" \
--data "params[request]=VALUE" \
--data "params[request_origin]=VALUE"
Example of a successful response
{
"requests": [
{
"id": 123,
"request": "Please restart the server",
"type": "KVM",
"status": "pending",
"customer_id": 456,
"created_at": "2024-05-20T12:00:00Z"
}
]
}
Failure response
{
"code": 400,
"message": "Please provide equipment ID, request type and origin to create a request"
}

rhr/chat

Sends a new message to an existing Remote Hands Request, updates the conversation history, and optionally creates support tickets or media attachments.

HTTP Method: POST

Parameters:

Parameter Required Type Description
id string The unique identifier of the RHR request
message string The content of the chat message

Example Request

curl -s "https://invapi.hostkey.com/rhr.php" -X POST \
--data "id=VALUE" \
--data "message=VALUE"
Example of a successful response
{
"history": [
{
"id": 12345,
"message": "Hello, I need help with my server.",
"component_id": 67890,
"tags": []
}
],
"requests": [
{
"id": 12345,
"request": "Server reboot required",
"status": "active"
}
]
}
Failure response
{
"code": 400,
"message": "Please provide request ID"
}

rhr/discard

Discards a specific Remote Hands Request by ID. If a response is provided, it is logged in the request history.

HTTP Method: POST

Parameters:

Parameter Required Type Description
id int The unique identifier of the RHR request to discard
params[response] string Comment or response text to be added to the history log

Example Request

curl -s "https://invapi.hostkey.com/rhr.php" -X POST \
--data "id=123" \
--data "params[response]=Your comment here"
Example of a successful response
{
"requests": [
{
"id": 123,
"status": "CANCELED",
"request_origin": "CLIENT",
"component_id": 456,
"tags": [
{
"name": "urgent",
"color": "#FF0000"
}
]
}
],
"history": [
{
"message": "User requested discard via API",
"created_at": "2024-05-20T12:00:00Z"
}
]
}
Failure response
{
"code": 400,
"message": "Please provide request ID"
}

rhr/list

Returns a list of Remote Hands Requests (RHR) based on filters like location, status, and date range. If the user is a customer, it also includes historical logs related to these requests.

HTTP Method: POST

Parameters:

Parameter Required Type Description
params[location] string Filter by location code (e.g., NL, DE)
params[status][] array<string> Accepts multiple values: status[]=PENDING&status[]=ACTIVE
params[deleted] boolean Whether to include deleted requests
params[date_from] string Start date for filtering
params[date_to] string End date for filtering
params[date][] array<string> Specific dates to filter by. Accepts multiple values: date[]=2024-01-01&date[]=2024-01-02
params[eq_id][] array<int> Filter by specific equipment IDs
location string Parameter location (detected in code)
status string Parameter status (detected in code)
deleted string Parameter deleted (detected in code)
date_issued string Parameter date_issued (detected in code)
date_from string Parameter date_from (detected in code)
date_to string Parameter date_to (detected in code)
date string Parameter date (detected in code)
token string API authentication token

Example Request

curl -s "https://invapi.hostkey.com/rhr.php" -X POST \
--data "action=list" \
--data "location=NL" \
--data "status[]=PENDING" \
--data "status[]=ACTIVE" \
--data "deleted=0" \
--data "date_issued=2024-01-01" \
--data "date_from=2024-01-01" \
--data "date_to=2024-12-31" \
--data "date[]=2024-05-20" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"action": "list",
"requests": [
{
"id": 123,
"status": "active",
"location": "NL",
"created_at": "2024-05-20T10:00:00Z"
}
],
"history": [
{
"component_id": 123,
"tags": [
{
"name": "system",
"value": "updated"
}
]
}
]
}
Failure response
{
"code": -1,
"message": "Access denied"
}
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×