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.

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

Parameters

NameDescription
uintIdUnit ID.
widthChart window width. According to this parameter, the optimum number of pixels for the chart is returned. 
useCrop

Сrop the time interval:

  • yes;
  • no.
cropBeginThe beginning of the interval, Unix time.
cropEndThe 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:

CodeDescription
6Undefined error.
4Wrong input parameters.
Download PDF file
Download Word document

See also