REST Commands : Aggregate Query Command

Aggregate Query Command
Aggregate queries perform metric calculations across objects selected from the perspective table. Compared to an object query, which returns fields for selected objects, an aggregate query only returns the metric calculations. An aggregate query provides all parameters in the URI of a GET request. The REST command is:
GET /{application}/{table}/_aggregate?{params}
where {application} is the application name, {table} is the perspective table, and {params} are URI parameters separated by ampersands (&). The following parameters are supported:
m=metric function (optional): The metric function to calculate for selected objects. Currently, the only metric function supported by Doradus Logging is COUNT(*), so this parameter can be omitted. Example:
m=COUNT(*)
q=text (optional): A DQL query expression that defines which objects to include in metric computations. If omitted, all objects are selected (same as q=*). Examples:
q=*
q=Level IN (warning, error)
f=grouping expression (optional): A grouping field expression, which divide computations into groups. When this parameter is omitted, the corresponding global query computes a single value for each metric function. When provided, the corresponding grouped query computes a value for each group value. Examples:
f=Tags
f=TOP(3,EventID)
f=TRUNCATE(Timestamp,HOUR)
Below is an example aggregate query using URI parameters:
GET /LogDepot/AppLogs/_aggregate?q=Level=error&m=COUNT(*)&f=TOP(3,MessageType)