Read geofences from file

To read geofences from a file, use the command exchange/import_zones_read:


:!: Current request can't be executed simultaneously with any request from this chapter and following requests:


Name Description
eventHash event name, which will be generated after reading geofences (optional parameter)

To upload a file with geofences, use a POST request with multiple contents (multipart/form-data).

For example:

Request URL:
Request Method: POST
Connection: keep-alive
Content-Length: 1281
Cache-Control: no-cache
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryzmBiAUFQVzA8mRkx
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.3
Accept-Encoding: gzip,deflate,sdch
Accept-Language: ru,en-US;q=0.8,en;q=0.6

Content-Disposition: form-data; name="params"

Content-Disposition: form-data; name="eventHash"

Content-Disposition: form-data; name="import_file"; filename="geofence.kml"
Content-Type: application/



{}	/* empty object if execution successful, if not - error code */

To be sure that geofences has been read, you can execute the command Events:

	"tm":<uint>,				/* current server time (UTC) */
			"d":{			/* data */
				"hash":<text>,		/* upload is complete */
				"zones":[<Object>]	/* array of geofences read */
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon   |   Copyright © 2002-2023 Gurtam