Actuals / Grouping

Actuals Grouping endpoint is a powerful sub endpoint for actuals that allows you to make fast grouping queries for summarizing actuals data. Endpoint's URL is:

https://<your_environment_url>/customer-api/1.0/actuals/grouping/

GET


When calling /actuals/grouping/ endpoint without parameters you will get all the actual hours from the database. But the strength in this endpoint is in it's grouping possibility. So you may for example group all the actuals by project and/or user. 

Example call to for first filtering actuals and then grouping the response by employee and project.

https://<your_environment_url>/customer-api/1.0/actuals/grouping/?actual.date__gt=2019-01-01&group_by=project,user

Example response:
{
    "count": 1,
    "csvUrl": "/customer-api/1.0/actuals/grouping/?group_by=project,user&actual.date__gt=2019-01-01&csv=true",
    "itemsPerPage": 500,
    "excelUrl": "/customer-api/1.0/actuals/grouping/?group_by=project,user&actual.date__gt=2019-01-01&excel=true",
    "next": null,
    "current": 1,
    "lastPage": 1,
    "data": [
        {
            "employee": 2310,
            "total_hours": 100.0,
            "task__project": 1
        }
    ],
    "previous": null
}
How did we do with this article?