Hi shalin.lazar !
Please find below the required information.
1. Please skip parameter "operateAs" - it needs only when you login under other sub-user.
We will add notes about it in documentation.
2. If there is not SSL certificates for monitoring site, the HTTPS will be not available.
Please request to your provider (or manager) Wialon Local with this issue
3. If the frequency of receiving data is not more than 30 minutes, you can execute request to get report data.
Before you need to create report for unit group, add table Unit Latest Data (select column), set up option "Addresses from Geofences" in report's settings (in this case if unit is in geofence, the address location will be changed to geofence's name).
After you can execute report, for example -for previous 30 minutes.
( Here is example )
Interval beginning 2021-01-26 08:00:00
Interval end 2021-01-26 08:29:59
Report execution time 2021-01-26 08:30:29
https://hst-api.wialon.com/wialon/ajax.html?svc=report/exec_report&sid=02a11914b29a58aa81c602eed3df0396
{"reportResourceId":930849,"reportTemplateId":6,"reportTemplate":null,"reportObjectId":269,"reportObjectSecId":0,"interval":{"flags":16777344,"from":0,"to":30},"reportObjectIdList":[]}
where "reportResourceId" - resource Id where report template is created
"reportTemplateId" - report template id
"reportObjectId" - unit group id
"interval":{"flags":16777344,"from":0,"to":30} - the values of flags means interval in minutes, "from"/"to" - how much
The response will reserve the report content (tables array, how much rows, grouping level, column names and etc).
Then you need to execute request to get table data - for example use request report/select_result_rows. It returns JSON that contains rows of all levels.
https://hst-api.wialon.com/wialon/ajax.html?svc=report/select_result_rows&sid=02a11914b29a602eed3df0396¶ms={"tableIndex":0,"config":{"type":"range","data":{"from":0,"to":5,"level":0,"unitInfo":1}}}
{"tableIndex":0,"config":{"type":"range","data":{"from":0,"to":5,"level":0,"unitInfo":1}}}
"tableIndex":0 - means 1st table in array
"from":0,"to":5 - as in previous request parameters rows: 6 , and level:1
Response
[
{
"n":0,
"i1":0,
"i2":0,
"t1":1581184794,
"t2":1581184794,
"d":0,
"uid":2075,
"c":[
"AKVF Samu3",
{
"t":"Batisha geofence",
"y":23.1959667206,
"x":91.3166732788
}
]
},
{
"n":1,
"i1":0,
"i2":0,
"t1":1611579809,
"t2":1611579809,
"d":0,
"uid":21414,
"c":[
"awesomebr",
{
"t":"Williams zones",
"y":42.1454546667,
"x":-123.325493167
}
]
},
{
"n":2,
"i1":0,
"i2":0,
"t1":1606132148,
"t2":1606132148,
"d":0,
"uid":22242,
"c":[
"diana zapravka",
{
"t":"Zone1",
"y":54.064365,
"x":38.2653316667
}
]
},
{
"n":3,
"i1":0,
"i2":0,
"t1":1606130259,
"t2":1606130259,
"d":0,
"uid":22256,
"c":[
"FREIG di",
{
"t":"France, Aube, Neuville-sur-Seine 10250, D 26",
"y":57.079603,
"x":65.233575
}
]
},
{
"n":4,
"i1":0,
"i2":0,
"t1":1582359234,
"t2":1582359234,
"d":0,
"uid":2070,
"c":[
"Renaul di",
{
"t":"Zone3",
"y":54.0035171509,
"x":38.3098869324
}
]
},
{
"n":5,
"i1":0,
"i2":0,
"t1":1603273334,
"t2":1603273334,
"d":0,
"uid":2284,
"c":[
"Unit 4",
{
"t":"market",
"y":54.9297294617,
"x":47.9538650513
}
]
}
]
So you will get in parameter "c" : unit name, zone name ("t"), coordinates (x & y)
"c":[
"Renaul di",
{
"t":"Zone3",
"y":50.0035171509,
"x":12.30988324
}
]
Please note if there is not geozones for location, the 't' will contain just address
{
"t":"France, Aube, Neuville-sur-Seine 10250, D 26",
"y":57.079603,
"x":65.233575
}
Diana Cheley
Wialon Hosting Expert
Gurtam