Command disabled: backlink

Table of Contents

Templates

To create, edit and delete report templates, use the command report/update_report:

svc=report/update_report&params={"itemId":<long>,
				 "id":<long>,
				 "callMode":<text>,
				 "n":<text>,
				 "ct":<text>,
				 "p":<text>,
				 "tbl":[
					 {
						"n":<text>,
						"l":<text>,
						"c":<text>,
						"cl":<text>,
						"s":<text>,
						"sl":<text>,
						"p":<text>,
						"sch":{	
							"f1":<uint>,
							"f2":<uint>,
							"t1":<uint>,
							"t2":<uint>,
							"m":<uint>,
							"y":<uint>,
							"w":<uint>
						},
						"f":<uint>
					}
				]}

Parameters

Name Description
itemId resource ID
id template ID
callMode action: create, update, delete
Parameters required only for create and update:
n template name
ct template type (see Get list of table types)
p parameters
tbl tables
n table type (see Get list of table types)
l table name
c list of columns
cl list of column labels
s list of columns (if it is statistics table)
sl list of column labels (if it is statistics table)
p table parameters
sch time limitation
f1 beginning of interval 1
f2 beginning of interval 2
t1 ending of interval 1
t2 ending of interval 2
m days of month mask
y months mask
w days of week mask
f table flags (see Execute report)

Response

On create and edit:

[
	<long>,		/* template ID */
	{
		"id":<long>,		/* template ID */
		"res_id":<long>,	/* resource ID */
		"name":<text>,		/* name */
		"calc_type":<text>,	/* template type */
		"params":<text>,	/* parameters */
		"tables":[{		/* tables */
			"name":<text>,		/* table type */
			"display_name":<text>,	/* table name */
			"columns":<text>,	/* list of columns */
			"column_names":<text>,	/* list of column labels */
			"stats":<text>,		/* list of columns (if it is statistics table) */
			"stats_names":<text>,	/* list of column labels (if it is statistics table) */
			"params":<text>,	/* table parameters */
			"schedule": {	/* 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 */
			},
			"flags":<uint>		/* table flags */
		}]
	}
]

Templates types are described in chapter Get list of table types.

Table types are described in chapter Execute report.

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

On delete:

[
	<long>,		/* template ID */
	null
]
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2024 Gurtam