1) Load the web form http://hosting.wialon.com/login.html
2) Enter your user login and password, press "login"
3) If authorisation was ok, in the web address field you will get the response with the token like
http://hosting.wialon.com/login.html?access_token=5bbfe4a4ad20f61f466ae093aeb811d3BB4432702CE8BC771547D35F32E0A0E64FAE40B6&svc_error=0
access_token=5bbfe4a4ad20f61f466ae093aeb811d3BB4432702CE8BC771547D35F32E0A0E64FAE40B6- this will be your token
The default token has several limitations, you can extand its access rights if you add the Additional parameters in the request from the specification https://weblog.gurtam.com/wp-content/up … hod_EN.pdf
4) After you get the token, you will be able to login under it.
https://hst-api.wialon.com/wialon/ajax.html?svc=token/login¶ms={"token":"5bbfe4a4ad20f61f466ae093aeb811d3BB4432702CE8BC771547D35F32E0A0E64FAE40B6"}
For all subsequent queries you will use the eid from the login response as the sid (Session Id)
5) In order to query report you will need to know the Resource ID and report Template ID .
So query available resources .
https://hst-api.wialon.com/wialon/ajax.html?svc=core/search_items¶ms={"spec": {
"itemsType": "avl_resource",
"propName": "sys_name",
"propValueMask": "*",
"sortType": "sys_name"
},
"force": 1,
"flags": "8193",
"from": 0,
"to": 0
}&sid=0416be7911e7a2cedd6bba0ae68e9c4e
Once you get the resource and report template make a query
https://hst-api.wialon.com/wialon/ajax.html?svc=report/exec_report¶ms={
"reportResourceId":13786188,
"reportTemplateId":13,
"reportObjectId":14224227,
"reportObjectSecId":0,
"interval":{
"from":1490040000,
"to":1490126399,
"flags":0
}
}&sid=0416be7911e7a2cedd6bba0ae68e9c4e
The result will have the total number of rows available
Now query for all the rows.
https://hst-api.wialon.com/wialon/ajax.html?svc=report/select_result_rows¶ms={
"tableIndex":0,
"config":{
"type":"range",
"data":{"from":0,"to":7,"level":1}
}}&sid=0416be7911e7a2cedd6bba0ae68e9c4e
Nishad Hussain Kaippally
Implementation Specialist, Middle East, Gurtam
"Computer science is no more about computers than astronomy is about telescopes."