Get rows in multilevel reports

To get rows in multilevel reports, use the command report/select_result_rows:

svc=report/select_result_rows&params={"tableIndex":<int>,
				      "config":{
				      		"type":<text>,
				      		"data":{}
				      }}

:!: You can find an example of this request in the sample Reports.

Parameters

Name Description
tableIndex table index
config configuration
type request type:
range – ordered sequence of rows;
row – row
data data for configuration

If the parameter type is set as range, then data has the following format:

"data":{
	"from":<uint>,
	"to":<uint>,
	"level":<uint>,
	"flat":<int>,
	"rawValues":<int>
}

Where,

    • from – first row index;
    • to – last row index;
    • level – nesting level;
    • flat – show nesting levels on a level with parent: 0 – no, 1 – yes (optional parameter, default – 0);
  • rawValues – show parameters vvt: 0 – no, 1 – yes (optional parameter, default – 0).

If the parameter type is set as row, then data has the following format:

"data":{
	"rows":[<int>],
	"level":<uint>,
	"flat":<int>
}

Where,

    • rows – row index (you can indicate the index of a nested row up to the next-to-last nesting level);
    • level – nesting level;
    • flat – show nesting levels on a level with parent: 0 – no, 1 – yes (optional parameter, default – 0);
    • from – index of first nested row (optional parameter);
  • to – index of last nested row (optional parameter).

Response

[
	{
		"n":<uint>,	/* row index (from 0) */
		"i1":<uint>,	/* number of first message in specified interval */
		"i2":<uint>,	/* number of last message in specified interval */
		"t1":<uint>,	/* time of first message in specified interval */
		"t2":<uint>,	/* time of last message in specified interval */
		"d":<int>,	/* quantity of rows with next nesting level */
		"c":[		/* cells array */
			<text>,		/* text value of cell */
			{		/* or object */
				"t":<text>,	/* formatted cell value */
				"v":<double>,	/* original cell value */
				"vt":<double>,	/* value type */
				"pi": {	/* property items */
					"t":<text>,	/* property items type */
					"ids": [ 	/* property items ID's array */	
					]
				},
				"y":<double>,	/* latitude */
				"x":<double>	/* longitude */
			}			
		],
		"r":[		/* holds subrows which corresponds to requested nesting level */
			{		/* set of fields will be the same as parent row has */
				"n":<uint>,
				"i1":<uint>,
				"i2":<uint>,
				...
			}
		]
	}
]

:!: Value types described in this article.