export_zones
To export geofences to a KML or KMZ file, use the exchange/export_zones command .
svc=exchange/export_zones¶ms={"fileName":<text>,
"zones":[
{
"itemId":<long>,
"id":<long>
}
],
"compress":<bool>}
This request can’t be executed simultaneously with any request from this chapter and the following requests:
- …/report/exec_report,
- …/report/export_result,
- …/report/get_result_chart,
- …/report/get_result_map,
- …/messages/load_interval,
- …/render/create_messages_layer,
- …/unit/get_trips,
- …/resource/get_driver_bindings,
- …/resource/get_trailer_bindings,
- …/account/get_account_history.
Parameters
Name | Description |
---|---|
fileName | File name. |
zones | Array of geofences. |
itemId | Resource ID. |
id | Geofence ID. |
compress | Specify 1 to compress the file, or 0 to get the uncompressed file. |
Response
If the request is completed successfully, a KML or KMZ file is returned.
Currently, if the resource or geofence with the specified ID is not found on the server, a XML response with the file name is generated:
Request
{"fileName":"export_zones_result","zones":[{"itemId":<nonexisting-resource-id>,"id":<nonexisting-geofence-id>}],"compress":0}
Response
<?xml version="1.0" encoding="utf-8"?>
<kml>
<Document>
<name>
export_zones_result
</name>
</Document>
</kml>
If the request is not completed, an error code is returned.
Error codes
Code | Description |
1 | Invalid or obsolete request SID. |
4 | One of the following errors:
|
6 | One of the following errors:
|