Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

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:

totalTotal number of aggregated data rows.int
groups

The results. The structure may depend on the aggregation but, in general, you will find:

  • One row per aggregation bucket (e.g. a status or a month)
  • The value of the bucket (a status code, a date)
  • The count which is the total of records in the bucket
  • The title of the bucket
int
propertiesThe details of the selected aggregation. Also see ./list/aggregationsarray<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"
    }
}
 

 

 

 

 

  • No labels