./list/aggregations/{id} (post)
Retrieves an aggregation (statistics) on the data, such as:
- Total jobs per job status
- Total deadlines per month
- etc.
URL
(POST) ./list/aggregations/{id}
PARAMETERS
URL parameters are:
id | The aggregation to retrieve.Use ./list/aggregations to get a list of all available aggregations with their ids. If not specified, the system uses the default aggregation. This always is the aggregation with ID "default". | string, Optional |
Â
The other parameters are included as a JSON object in the request body:
Â
query | Optional query string using a simple but powerful query language. Example: {jobid} > 1000 AND {dtstart} > DateTime(2018, 10, 10) The aggregation will be calculated for the queried data only. | Optional, string? |
Â
RESULTS
The method returns a JSON object with these properties:
total | Total number of aggregated data rows. | int |
buckets | A list of buckets. A bucket is the aggregated value, the total count of records with the value and descriptive information:
| int |
properties | The details of the selected aggregation. Also see ./list/aggregations | array<object> |
Â
EXAMPLES
An aggregation by job status:
{ "total": 120, "buckets": [ { "value": 0, "title": "Draft", "css": "status draft", "query": "{status}.Matches(0)", "count": 119 }, { "value": 2, "title": "Inactive", "css": "status inactive", "query": "{status}.Matches(2)", "count": 1 } ], "properties": { "id": "bystatus", "name": "Job counts per status", "desc": "Indicates total jobs per job status." } } Â
Â
Â
Â
Â
Copyright Wordbee - Buzzin' Outside the Box since 2008