render_json
Can only be used in Wialon Hosting and Wialon Local 2204.
The render_json function is used to get a chart’s JSON.
svc=report/render_json¶ms={"uintId":<long>,
"width":<uint>,
"useCrop":<uint>,
"cropBegin":<uint>,
"cropEnd":<uint>}
Parameters
| Name | Description |
|---|---|
| uintId | Unit ID. |
| width | Chart window width. According to this parameter, the optimum number of pixels for the chart is returned. |
| useCrop | Сrop the time interval:
|
| cropBegin | The beginning of the interval, Unix time. |
| cropEnd | The end of the interval, Unix time. |
Returned result
{
"data":{
"PARAM_NAME_1": {
"x": [<double>,...],
"y": [<double>,...],
},
"PARAM_NAME_2": { ... }
},
"possitions": {
"time": [<double>,...],
"lat": [<double>,...],
"lon": [<double>,...],
}
}
Instead of the PARAM_NAME there should be the name of a message parameter.
Possible error codes:
| Code | Description |
|---|---|
| 6 | Undefined error. |
| 4 | Wrong input parameters. |