multi_export

The exchange/multi_export method allows you to export units and unit groups to a ZIP archive, together with their messages if needed. To create units from this archive, use the exchange/multi_import method.

To use the method, the Import/Export service must be enabled for the account. Each ID specified in the ids parameter counts as one use of the service.

In Wialon Local, this method is available starting from version 2304.

Endpoint

Copied!
svc=exchange/multi_export&params={
  "ids": [<long>],
  "props": <uint>,
  "time_from": <uint>,
  "time_to": <uint>
}

Parameters

The required parameters are marked with an asterisk (*).

Parameter Description
ids* Array of unit and unit group IDs. For a unit group, all its units are exported. Each unit is exported once, even if it’s specified several times or belongs to several groups.
props Unit properties to export. The value is a sum of the property flags. The default value is 0xFFFF (all properties).
time_from Start of the interval for which the unit messages are exported (UNIX time).
time_to End of the interval for which the unit messages are exported (UNIX time).

The messages are exported only if both time_from and time_to are specified. If one of them is missing, only the unit properties are exported.

Property flags

The table below lists the available flags and the access rights to the unit that are required to export the corresponding properties.

Flag Properties Required access right
0x1 General properties. View object and its basic properties
0x2 Sensors. View object and its basic properties
0x4 Custom fields. View custom fields
0x8 Admin fields. View admin fields
0x10 Commands. View commands
0x20 Service intervals. View service intervals
0x40 Profile. View custom fields
0x80 Counters. View object and its basic properties
0x100 Device configuration. Edit connectivity settings
0x200 Report settings. View detailed object properties
0x400 Advanced properties. View detailed object properties
0x800 Trip detector settings. View detailed object properties
0x1000 Eco driving settings. View detailed object properties
0x2000 Unit icon. Exported only together with the 0x1, 0x2, or 0x80 flag. View object and its basic properties

The fuel consumption settings are always exported.

If you don’t have the access right required for a flag, the corresponding properties aren’t exported, and no error is returned. If you don’t have the access rights to any of the requested properties, the unit isn’t exported. To export the unit messages, the Export messages access right is required.

Response

If the request is completed successfully, the multi_export.zip archive is returned. For each unit, the archive contains the following files:

File Contents
<unit name>_<unit ID>.wlp Unit properties.
<unit name>_<unit ID>.wlb Unit messages. The file is added only if the interval is specified and the unit has messages for this interval.

The / characters in the unit name are replaced with _ in the file names.

If the request fails, an error code is returned.

Error codes

Error code Description
4 Wrong input parameters.
6 No units were exported. For example, the specified IDs don’t belong to units or unit groups, the user doesn’t have access rights to the units, or the Import/Export service isn’t available for the account.
1003 The limit on simultaneous resource-intensive requests is reached (the LIMIT api_concurrent reason).

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