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 URL parameter id refers to the specific aggregation to retrieve. Use API call ./list/aggregations to obtain the list of available aggregations. Drop the parameter to retrieve the default aggregation (id = null). | 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 |
groups | The results. The structure may depend on the aggregation but, in general, you will find:
| int |
properties | The details of the selected aggregation. Also see ./list/aggregations | array<object> |
EXAMPLES
An aggregation by job status:
{ "total": 464, "groups": [ { "value": 0, "title": "Draft", "count": 360 }, { "value": 3, "title": "Proposal", "count": 25 }, { "value": 5, "title": "In progress", "count": 30 }, { "value": 6, "title": "Completed", "count": 49 } ], "properties": { "id": null, "name": "Job counts per status", "desc": "Indicates total jobs per job status" } }