This documentation provides a general overview of the grouping functionality available for specific endpoints within our API. All grouping endpoints operate in a similar way, allowing you to summarize and organize data efficiently, making it easier to extract meaningful insights from your data.
The Capacity Grouping and Allocations Grouping endpoints serve a common purpose—they enable you to group and summarize data based on specific criteria. While they are tailored for different types of data (capacity and allocations), their functionality and usage patterns are quite similar.
.1
https://<your_environment_url>/customer-api/1.0/capacity/grouping/
.2
https://<your_environment_url>/customer-api/1.0/allocations/grouping/
.3
https://<your_environment_url>/customer-api/1.0/actuals/grouping/
All above endpoints use the HTTP GET method to retrieve grouped data. When you make a GET request to these endpoints without any parameters, you will receive the same result as if you had not used grouping. However, the real power of these endpoints lies in their grouping capabilities, allowing you to aggregate data effectively.
To effectively use either the Capacity Grouping or Allocations Grouping endpoint, you must include common parameters:
allocation/actual/(capacity does not have a prefix).date__gte
: Specifies the start date in 'yyyy-mm-dd' format.allocation/actual/(capacity does not have a prefix).date__lte
: Specifies the end date in 'yyyy-mm-dd' format.timeslot
: Defines the time unit for grouping. Possible values include 'day,' 'week,' 'month,' and 'year.'group_by
: Determines the grouping criteria. You can group by attributes such as 'user,' 'node,' 'role,' 'project,' or 'user,' or use a combination of these.
Here is an example of a call to either the Capacity Grouping or Allocations Grouping endpoint:
https://<your_environment_url>/customer-api/1.0/capacity/grouping/?date__gte=2020-01-01&date__lte=2020-12-31×lot=month&group_by=user
This call, whether for capacity or allocations or actuals, groups data by 'user' within monthly time slots for the specified date range.