Skip to content

reports.php

Reports management module for administrative tasks including billing synchronization, traffic usage analysis, and deployment logs.


reports/asa_log

Logs an ASA event with details about the IP address and action performed.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: asa_log
token ✅ string Authentication token.
message ❌ string JSON encoded message containing event details (action, username, ipinfo, ipexternal, ipinternal, message).
ipinternal ✅ string Параметр ipinternal
username ✅ string Параметр username
ipinfo ✅ string Параметр ipinfo
ipexternal ✅ string Параметр ipexternal

Request example

curl -s "https://invapi.hostkey.com/reports.php" -X POST \
--data "action=asa_log" \
--data "token=HOSTKEY_TOKEN" \
--data "ipinternal=VALUE" \
--data "username=VALUE" \
--data "ipinfo=VALUE" \
--data "ipexternal=VALUE"
Success response example
{
"result": "OK",
"message": "{\"action\": \"login\", \"username\": \"user1\", \"ipinfo\": {}, \"ipexternal\": \"1.2.3.4\", \"ipinternal\": \"10.0.0.1\", \"message\": \"User logged in\"}"
}
Error examples
{
"code": -1,
"message": "Authentication required or invalid token"
}

reports/count_software_installs

Updates the installation counts for all software components in the system and logs the results.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: count_software_installs
token ✅ string Authentication token for API access.

Request example

curl -s "https://invapi.hostkey.com/reports.php" -X POST \
--data "action=count_software_installs" \
--data "token=HOSTKEY_TOKEN"
Success response example
{
"result": "OK",
"module": "reports",
"action": "count_software_installs",
"message": "Software installs updated"
}
Error examples
{
"code": -1,
"message": "Unknown action count_software_installs"
}

reports/create_preset_reports

Initializes the system with predefined report templates.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: create_preset_reports
token ✅ string Authentication token for API access.

Request example

curl -s "https://invapi.hostkey.com/reports.php" -X POST \
--data "action=create_preset_reports" \
--data "token=HOSTKEY_TOKEN"
Success response example
{
"result": "OK",
"module": "reports",
"action": "create_preset_reports"
}
Error examples
{
"code": -1,
"message": "Authentication required or invalid token"
}

reports/execute

Executes a specific report based on the provided ID.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: execute
id ❌ integer Report ID to execute.

Request example

curl -s "https://invapi.hostkey.com/reports.php" -X POST \
--data "action=execute" \
--data "id=123"
Success response example
{
"result": "OK",
"module": null,
"action": "execute",
"report": {}
}
Error examples
{
"code": -1,
"message": "Error description"
}

reports/generate_daily

Generates a daily report for the specified ID. Currently, this action is not used but triggers platform-wide reporting processes.

HTTP method: POST|GET

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: generate_daily
id ❌ integer The ID of the entity for which to generate the report.

Request example

curl -s "https://invapi.hostkey.com/reports.php" -X POST \
--data "action=generate_daily"
Success response example
{
"result": "OK"
}
Error examples
{
"code": -1,
"message": "Error generating report"
}

reports/ovirt_ip

Returns a report of OVIRT IP addresses for the specified location.

HTTP method: POST|GET

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: ovirt_ip
location ❌ string Location filter for the report.

Request example

curl -s "https://invapi.hostkey.com/reports.php" -X POST \
--data "action=ovirt_ip"
Success response example
{
"result": "OK",
"action": "ovirt_ip",
"module": "reports",
"data": [
{
"id": 101,
"ip": "192.168.1.10",
"status": "active",
"location": "NL"
}
]
}
Error examples
{
"code": -1,
"message": "Error description"
}

reports/port_of_virt_node

Returns a report containing information about the ports of Virt nodes in the specified location.

HTTP method: POST|GET

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: port_of_virt_node
token ✅ string Authentication token.
location ❌ string Location filter.
id ❌ integer ID parameter (default -1).

Request example

curl -s "https://invapi.hostkey.com/reports.php" -X POST \
--data "action=port_of_virt_node" \
--data "token=HOSTKEY_TOKEN"
Success response example
{
"result": "OK",
"action": "port_of_virt_node",
"module": "reports",
"data": [
{
"id": 123,
"name": "example_node",
"status": "active",
"location": "NL"
}
]
}
Error examples
{
"code": -1,
"message": "Error description"
}

reports/tplatforms

Generates a T-Platforms usage report for the specified period.

HTTP method: POST|GET

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: tplatforms
period_from ❌ string Start date for the report period.
period_to ❌ string End date for the report period.

Request example

curl -s "https://invapi.hostkey.com/reports.php" -X POST \
--data "action=tplatforms"
Success response example
{
"result": "OK",
"module": null,
"action": "tplatforms",
"data": []
}
Error examples
{
"code": -1,
"message": "Error description"
}

reports/windows_ip

Returns a list of IP addresses for servers with licensed Windows operating systems to facilitate activation server access.

HTTP method: POST|GET

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: windows_ip
token ✅ string Authentication token.
location ❌ string Filter by location. Default is empty string.

Request example

curl -s "https://invapi.hostkey.com/reports.php" -X POST|GET \
--data "action=windows_ip" \
--data "token=HOSTKEY_TOKEN"
Success response example
{
"result": "OK",
"action": "windows_ip",
"module": "reports",
"data": [
{
"ip": "192.168.1.1",
"server_id": 101,
"location": "NL",
"os": "Windows Server 2022"
},
{
"ip": "192.168.1.2",
"server_id": 102,
"location": "DE",
"os": "Windows Server 2019"
}
]
}
Error examples
{
"code": -1,
"message": "Error description"
}
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×