In Reporter, how do I generate two-level report by using Web API?

book

Article ID: 166591

calendar_today

Updated On:

Products

Reporter

Issue/Introduction

What is the Web API syntax to specify the number of rows to be returned for each level?

How do I generate two-level report with maximum of 5 and 10 rows respectively for each level?

Is there a limit on the number of levels of a report?

Resolution

Use the summarizeBy parameter to provide summary information based on database fields. It is similar to the GROUP BY SQL command. Reports can have up to three summarizeBy fields. Optionally, you can specify the number of rows to be returned for each level.

Example:

One level report

summarizeBy=c_ip

Two level report

summarizeBy=cs_username|c_ip

Three level report

summarizeBy=cs_username|c_ip|cs_host

Two level report with maximum of 5 and 10 rows respectively for each level

summarizeBy=cs_username|cs_host&rows=5|10

Sample API command:

https://127.0.0.1:8082/api/create?username=admin&password=admin&database=MyDatabase&role=_admin&action=download&label=MyReport&format=pdf&columns=hits|page_views&summarizeBy=cs_username|cs_host&rows=5|10