REST Commands : Aggregate Query Command : Global Aggregates

Global Aggregates
Without a grouping parameter, an aggregate query returns a single value: the metric function computed across all selected objects. Consider the following aggregate query URI REST command:
GET /LogDepot/AppLogs/_aggregate?m=COUNT(*)&q=EventID=540
This aggregate query returns counts all objects in the AppLogs table whose EventID is 540. A typical response in XML is:
<results>
<aggregate metric="COUNT(*)" query="EventID=540"/>
<totalobjects>309142</totalobjects>
<value>309142</value>
</results>
In JSON:
{"results": {
"aggregate": {
"metric": "COUNT(*)",
"query": "EventID=540"
},
"totalobjects": "309142",
"value": "309142"
}}
As shown, the aggregate element lists the parameters used for the aggregate query, in this case the metric (?m) and query (&q) parameters. For a global aggregate, the metric value is provided in the value element. The number of objects scanned to compute the metric value is also returned in the totalobjects element.