v1
latestOpenAPI 3.1.02026-07-2466150275.0 KBProjects
Aggregate Projects
Aggregate projects with GROUP BY operations.
Allows grouping by name, city, country, site_code, and other fields with aggregation functions like COUNT, SUM, AVG, MIN, MAX. Uses the same base filters and company scoping as the search endpoint for consistent behavior.
post/v1/project/aggregate
Request body
Example request
{
"aggregations": [
{
"alias": "total_projects",
"column": "id",
"operator": "count"
}
],
"date_filter_column": "updated_at",
"group_by": [
"city",
"country"
],
"is_archived": false,
"limit": 50,
"query": "warehouse",
"skip": 0,
"sort_column": "total_projects",
"sort_direction": "desc"
}Response
Successful Response
Example response
{
"data": {
"data": [
{
"city": "Toronto",
"country": "Canada",
"total_projects": 15
},
{
"city": "Vancouver",
"country": "Canada",
"total_projects": 8
},
{
"city": "New York",
"country": "USA",
"total_projects": 12
}
],
"metadata": {
"aggregations": [
{
"alias": "total_projects",
"column": "id",
"operator": "count"
}
],
"group_by_columns": [
"city",
"country"
]
},
"total_groups": 3
}
}