Get templates data

To get templates data, use the command report/get_report_data:

svc=report/get_report_data&params={"itemId":<long>,
				   "col":[<long>]}

Parameters

Name Description
itemId resource ID
col array of templates IDs
flags response flags
Flag HEX Flag DEC Description
0x0 0 full JSON (default)
0x1 1 base info and binded units/groups
0x2 2 base info and short tables info
0x4 4 base info and full tables info

Response

[
	{
		"id":<long>,		/* template ID */
		"n":<text>,		/* name */
		"ct":<text>,		/* type (see below) */
		"p":<text>,		/* parameters */
		"tbl":[			/* tables */
			{
				"n":<text>,	/* table type */
				"l":<text>,	/* name */
				"c":<text>,	/* list of columns */
				"cl":<text>,	/* list of column labels */
				"s":<text>,	/* list of columns (if it is statistics table) */
				"sl":<text>,	/* list of column labels (if it is statistics table) */
				"p":<text>,	/* table parameters */
				"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 */
					"m":<uint>,	/* days of month mask  */
					"y":<uint>,	/* months mask */
					"w":<uint>	/* days of week mask */
					"fl":<uint>	/* incomplete interval (0 - don't cut off , 1 - show and cut off, 2 - don't show in report, 3 - show and mark as incomplete) */
 
				},
				"f":<uint>		/* table flags */
			}
		]
	}
]

Templates types:

  • avl_unit;
  • avl_unit_group;
  • storage_user;
  • avl_driver;
  • avl_trailer;
  • avl_resource;
  • avl_retranslator;
  • avl_route;
  • avl_drivers_group;
  • avl_trailers_group;
  • avl_tag;
  • avl_tags_group.

Table flags are described in the chapter Execute report.

To get types of tables which can be included into reports, use the request get_report_tables.

Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2020 Gurtam