Load events into session

To load events for a specified period into session for later processing please use events/load:

svc=events/load&params={"itemId":<long>,
			"ivalType":<int>,
			"timeFrom":<uint>,
			"timeTo":<uint>,
			"detectors":[
				{
					"type":<text>,
					"filter1":<uint>
				},
				...
			],
			"selector":
				{....}
 
                      }

Parameters

Param Description
itemId unit id
ivalType algorithm type (see below)
timeFrom interval start, UNIX-time
timeTo interval end, UNIX-time
type sensors group: lls, sensors, ignition, trips (see here)
filter1 sensor id, 0 - add all sensors according to selected type
selector selector

:!: Using signature with optional selector param is like using both events/load (without selector) and events/get.

:!: If you need to load another pack of events into session please use events/unload first and then execute this method once more.

ivalType

Value Description
1 history request from timeFrom to timeTo
2 history request of timeFrom number of events from timeTo (forward)
3 history request of timeFrom number of events from timeTo (backward)

Response

{
	"events":{
		"counters":{
			"0":<uint>			/* number of events - counter value updates in history request */
		},
		"ignition":{
			"<sensor_id1>":<uint>,		/* number of events in history request for specified sensor */
			...
		},
		"lls":{
			"<sensor_id2>":<uint>,		/* number of events in history request for specified sensor */
			...
		},
		"sensors":{
			"<sensor_id3>":<uint>,		/* number of events in history request for specified sensor */
			...
		"trips":{
			"0":<uint>			/* number of events in history request for trips */
		}
	},
	"selector":[
			{
			    ...
			},				/* selection results, if selector param was skipped then {}; look at server response in events/get */
			...
	]
}
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2024 Gurtam