Тема: Vehicle group report template Node.js
Can you get the reports of a group of vehicles?
In the wialon platform we created a template that allows you to obtain the trip report of a vehicle group, but we need to store this data.
I know that repor / exec_report generate the report, but with the id of the unit.
So my question is, how can I generate this report for the group of units?
If I enter the id of the group, you must know the id of the unit generates error 4.
function execReport () {
var params = {
"reportResourceId": 17976293,
"reportTemplateId":8,
"reportObjectId":17723259, //ID of group
"reportObjectSecId":0,
"interval":{
"from":1539302401,
"to":1539388799,
"flags":0
}
};
request.post({
url: URL + 'svc=report/exec_report',
json: true,
form: {
sid: SID,
params: JSON.stringify(params)
}
}, function (error, response, body) {
console.log(body);
//resultRowsTravel();
});