render_json

Can only be used in Wialon Hosting and Wialon Local 2204.

The render_json method is used to get a chart’s JSON.

Copied!
svc=render/render_json&params={"unitId":<long>,
							   "width":<uint>,
							   "useCrop":<uint>,
							   "cropBegin":<uint>,
							   "cropEnd":<uint>}

Parameters

Name Description
unitId 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:
  • 1 — yes;
  • 0 — no.
cropBegin The beginning of the interval, Unix time.
cropEnd The end of the interval, Unix time.

Returned result

Copied!
{
	"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.

If you find a mistake in the text, please select it and press Ctrl+Enter.