Skip to content

dashboards.php

Dashboard management module for handling reports and dashboard configurations

API Methods

Method Action Description
add_report add report Adds a specific report to the dashboard.
delete_report delete report Removes a specific report from the dashboard.
delete_report_all delete all reports Removes all reports from the specified dashboard.

dashboards/add_report

Adds a specific report to the dashboard.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: add_report
token ✅ string Authentication token
id ❌ integer Dashboard identifier
report_id ❌ integer Report identifier to be added
sort_order ❌ integer Sorting order for the report

Request example

curl -s "https://invapi.hostkey.com/dashboards.php" -X POST \
--data "action=add_report" \
--data "token=HOSTKEY_TOKEN" \
--data "id=123" \
--data "report_id=456" \
--data "sort_order=1"
Success response example
{
"result": "OK",
"action": "add_report",
"data": {}
}
Error examples
{
"code": -1,
"message": "Error description"
}

dashboards/delete_report

Removes a specific report from the dashboard.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: delete_report
token ✅ string Authentication token
id ❌ integer Dashboard identifier
report_id ❌ integer Report identifier to be deleted

Request example

curl -s "https://invapi.hostkey.com/dashboards.php" -X POST \
--data "action=delete_report" \
--data "token=HOSTKEY_TOKEN" \
--data "id=123" \
--data "report_id=456"
Success response example
{
"result": "OK",
"action": "delete_report",
"data": {
"status": "deleted",
"id": 456
}
}
Error examples
{
"code": -1,
"message": "Error description"
}

dashboards/delete_report_all

Removes all reports from the specified dashboard.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: delete_report_all
token ✅ string Authentication token
id ❌ integer Dashboard identifier

Request example

curl -s "https://invapi.hostkey.com/dashboards.php" -X POST \
--data "action=delete_report_all" \
--data "token=HOSTKEY_TOKEN" \
--data "id=123"
Success response example
{
"result": "OK",
"action": "delete_report_all",
"data": {
"count": 5,
"status": "success"
}
}
Error examples
{
"code": -1,
"message": "Error description"
}
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×