Depending on set flags format of response can differ.
This chapter describes flags that can be applied to resources and parts of resulting JSON which they are responsible for. If you specify several flags, then parts will be united into one JSON.
Resource flags:
Value | Description |
---|---|
0x00000001 | base flag |
0x00000002 | custom properties |
0x00000004 | billing properties |
0x00000100 | drivers |
0x00000400 | jobs |
0x00001000 | notifications |
0x00002000 | POIs |
0x00004000 | geofences |
0x00008000 | report templates |
Flag - 0x00000001
{ "nm":<text>, /* name */ "cls":<uint>, /* superclass ID: "avl_resource" */ "id":<uint> /* resource ID */ }
Flag - 0x00000002
You can store any resource data you need in custom properties.
{ "prp":{ /* custom properties */ <text>:<text>, /* name: value */ ... }, "pup":{ /* private and public properties */ <text>:<text>, /* name: value */ ... } }
Flag - 0x00000004
{ "crt":<uint>, /* creator ID */ "bact":<uint> /* account ID */ }
Flag - 0x00000020
{ "gd":<text> /* resource GUID */ }
Flag - 0x00000100
{ "drvrs":{ <text>:{ /* sequence number of driver */ "id":<long>, /* ID */ "nm":<text>, /* name */ "c":<text>, /* code */ "ds":<text>, /* description */ "p":<text>, /* phone number */ "r":<double>, /* image aspect ratio */ "ck":<ushort> /* check sum (CRC16) */ }, ... }, "drvrs_max":<long> /* maximal count of drivers (-1 - unlimited) */ }
Flag - 0x00000400
{ "ujb":{ <text>:{ /* sequence number of job */ "id":<uint>, /* ID */ "nm":<text>, /* name */ "de":<text>, /* description */ "rsch":<text>, /* execution type */ "at":<uint>, /* activation time */ "mt":<uint>, /* maximal executions count, 0 - unlimited */ "tz":<int>, /* time zone (sec) */ "la":<text>, /* language used for job */ "je":<int>, /* active/inactive */ "dt":<uint>, /* executions count */ "ldt":<uint>, /* last execution time */ "sch":{ /* time limitation */ "f1":<uint>, /* beginning of interval 1 */ "f2":<uint>, /* beginning of interval 2 */ "t1":<uint>, /* ending of interval 1 */ "t2":<uint>, /* ending of interval 2 */ "mdm":<uint>, /* days of month mask */ "ymm":<uint>, /* months mask */ "wdm":<uint> /* days of week mask */ }, "act":{ /* actions */ "t":<text>, /* job type */ "p":{ /* parameters */ <text>:<text>, /* name: value */ ... } } } }, "ujbmax":<long> /* maximal count of jobs (-1 - unlimited) */ }
Execution and action types are described in chapter Jobs: create, edit, delete.
Flag - 0x00001000
{ "unf":{ <text>:{ /* sequence number of notification */ "id":<long>, /* ID */ "nm":<text>, /* name */ "txt":<text>, /* text of notification */ "ta":<uint>, /* activation time (UNIX format) */ "td":<uint>, /* deactivation time (UNIX format) */ "ma":<uint>, /* maximal alarms count (0 - unlimited) */ "mmtd":<uint>, /* maximal time interval between messages (seconds) */ "cdt":<uint>, /* timeout of alarm (seconds) */ "mast":<uint>, /* minimal duration of alert state (seconds) */ "mpst":<uint>, /* minimal duration of previous state (seconds) */ "cp":<uint>, /* period of control relative to current time (seconds) */ "fl":<uint>, /* notification flags */ "tz":<int>, /* time zone */ "la":<text>, /* notification language (two-lettered code) */ "ac":<uint>, /* alarms count */ "sch":{ /* time limitation */ "f1":<uint>, /* beginning of interval 1 */ "f2":<uint>, /* beginning of interval 2 */ "t1":<uint>, /* ending of interval 1 */ "t2":<uint>, /* ending of interval 2 */ "mdm":<uint>, /* days of month mask */ "ymm":<uint>, /* months mask */ "wdm":<uint> /* days of week mask */ }, "un":[<long>], /* array of units GUIDs */ "act":[ /* actions */ { "t":<text>, /* action type */ "p":{ /* parameters */ <text>:<text>, /* name: value */ ... } } ], "trg":{ /* control */ "t":<text>, /* control type */ "p":{ /* parameters */ <text>:<text>, /* name: value */ ... } } } }, "unfmax":<long> /* maximal count of notifications (-1 - unlimited) */ }
Action types, control types and notification flags are described in the chapter Notifications: create, edit, delete.
Flag - 0x00002000
{ "poi":{ <text>:{ /* sequence number of POI */ "id":<long>, /* ID */ "nm":<text>, /* name */ "de":<text>, /* description */ "y":<double>, /* latitude */ "x":<double>, /* longitude */ "r":<uint>, /* image aspect ratio */ "d":<uint>, /* radius, m */ "f":<uint>, /* flag: 1 - show circle, 0 - hide */ "cr":<uint>, /* color RGB */ "c":<ushort> /* check sum of image (CRC16) */ }, ... }, "poimax":<long> /* maximal count of POIs (-1 - unlimited) */ }
Flag - 0x00004000
{ "zl":{ <text>:{ /* sequence number of geofence */ "n":<text>, /* name */ "i":<long>, /* ID */ "t":<int>, /* type: 1 - line, 2 - polygon, 3 - circle */ "d":<uint>, /* line thickness or circle radius */ "dr":{ "addr":<int>, /* address source: 0 - no, 1 - yes */ "ride_begin":<uint>, /* ride beginning: 0 - no, 1 - yes */ "ride_end":<uint>, /* ride end: 0 - no, 1 - yes */ "color":<uint> /* color (ARGB) */ }, "p":<text> /* check points coordinates (y,x,z,...) */ } }, "zlmax":<long> /* maximal count of geofences (-1 - unlimited) */ }
Flag - 0x00008000
{ "rep":{ <text>:{ /* sequence number of template */ "id":<long>, /* ID */ "nm":<text>, /* name */ "ct":<text> /* template type*/ } }, "repmax":<long> /* maximal count of templates (-1 - unlimited) */ }
Types of templates are described in the chapter Get list of table types.