get_task_messages
The messages/get_task_messages request allows you to load registered event messages for all units to which you have the View object and its basic properties access rights.
svc=messages/get_task_messages¶ms={
"itemIds": [<long>],
"timeFrom":<uint>,
"timeTo":<uint>,
"loadCount":<uint>
}
Request example:
https://hst-api.wialon.com/wialon/ajax.html?sid=b8c179f636baedfd43e1890bd48a8ee9&svc=messages/get_task_messages¶ms={
"itemIds":[1546, 1545],
"timeFrom": 1724347800,
"timeTo": 1724693399,
"loadCount": 10000
}
Parameters
The following parameters are required:
Name | Description |
itemIds | The IDs of the units. |
timeFrom | The beginning of the interval. |
timeTo | The end of the interval. |
loadCount | Number of messages to return. The maximum number is 20000. |
Response
Example of a response when the request is completed successfully:
{
"count": 5,
"messages": [
{
"item_id": 1546,
"t": 1724420460,
"f": 1536,
"tp": "task",
"et": "adf",
"x": 0,
"y": 0,
"rt": 1724420493,
"p": {
"task_sub_type": 21,
"task_reg_type": 1,
"task_evt_name": "Custom event",
"task_id": "b1978b93a308c5c3be0697223bf0c5002ee87de02ce7937b23a34830516c330466c8916c",
"task_update_time": 1724420460,
"task_status": 6,
"task_priority": 2,
"task_assignee": 0,
"task_description": "VHS Glitch violated speed limitations."
"task_tags": "{\"SPEED\":\"25 km/h\",\"POS_TIME\":\"10.07.2025 15:52:28\",\"UNIT\":\"VHS Glitch\"}",
"task_comments": "[]",
"task_account": 1063
"task_address_x": 56.65078,
"task_address_y": 53,
"task_done_rejected": 1752152438,
"task_params": {}
}
},
]
}
If the request is not completed, an error code is returned.
Error codes
Error code | Description |
4 | Invalid input parameters. |
5 | Request execution error. |
7 | Access denied. The View object and its basic properties access rights to the units is required. |
1004 | The maximum number of messages (loadCount) is exceeded. |