Тема: Executing a report with a "reportTemplate" parameter using Remote API
I am trying to execute a report and according to this documentation, I can provide a reportTemplate parameter. I got the data from the reportTempate parameter by executing this query.
Then, from that data I am executing the query below. However, I get { error: 4, reason: 'WRONG_PARAMS' }. Please help me figure out what is wrong with my query.
Note: "reporteResourceId" is the resourceId of the current user, "reportObjectId" is a the ID of an avl_unit. And the whitespaces are only added for better readability (my real query does not contain whitespaces).
https://hst-api.wialon.com/wialon/ajax.html?svc=report/exec_report¶ms={
"reportResourceId":13938986,
"reportTemplateId":0,
"reportObjectId":16902145,
"reportObjectSecId":0,
"interval":{
"from":1525809600,
"to":1525895940,
"flags":0
},
"reportTemplate":{
"id": 5,
"n": "RAMIL - Simple Report",
"ct": "avl_unit",
"p": "{\"bind\":{\"avl_unit\":[]}}",
"tbl": [
{
"n": "unit_stats",
"l": "Statistics",
"c": "",
"cl": "",
"cp": "",
"s": "[\"address_format\",\"time_format\",\"us_units\"]",
"sl": "[\"Address\",\"Time Format\",\"Measure\"]",
"p": "{\"address_format\":\"1255211008_10_5\",\"time_format\":\"%Y-%m-%E_%H:%M:%S\",\"us_units\":0}",
"sch": {
"f1": 0,
"f2": 0,
"t1": 0,
"t2": 0,
"m": 0,
"y": 0,
"w": 0,
"fl": 0
},
"f": 0
}
]
}}&sid=061bab3b585d4dccd5c1b66840e90864