Learn about the other types used reading aggregated board data using the platform API
The monday.com aggregate
API enables you to retrieve board data using groupings and aggregation functions via the API.
Each of the object types described below represents a specific aspect of an aggregation query. They can be provided as arguments to define an aggregation function or queried as fields.
AggregateQueryInput
An object containing the aggregation query to execute.
Field | Description | Supported Fields |
---|---|---|
from AggregateFromTableInput! | The data source for the aggregation. | id ID! type AggregateFromElementType! |
group_by [AggregateGroupByElementInput!] | The fields to group results by. The default is 1,000. | column_id String! limit Int (default is 1,000) |
limit Int | The number of results to return. | |
query ItemsQuery | The filters for the items being aggregated. Without it, all items will be returned. | groups [ItemsQueryGroup!] ids [ID!] operator ItemsQueryOperator order_by [ItemsQueryOrderBy!] rules [ItemsQueryRule!] |
select [AggregateSelectElementInput!]! | The fields or functions to return. | as String! column AggregateSelectColumnInput function AggregateSelectFunctionInput type AggregateSelectElementType! |
AggregateFromTableInput
An object containing the source table and its ID for the aggregation query.
Field | Description | Enum Values |
---|---|---|
id ID! | The unique identifier of the source (e.g., board ID). | |
type AggregateFromElementType! | The source type. | TABLE |
AggregateGroupByElementInput
An object containing the item limit and column to group results by.
Field | Description |
---|---|
column_id String! | The unique identifier of the column to group results by. |
limit Int | The number of results to return. The default is 1,000. |
AggregateSelectElementInput
An object containing the fields or functions to return.
Field | Description | Enum Values | Supported Fields |
---|---|---|---|
as String! | The field's alias to be used in the result set. | ||
column AggregateSelectColumnInput | The column to select from the source. Required if type is COLUMN . | column_id String! | |
function AggregateSelectFunctionInput | The function to apply to the specified fields. Required if type is FUNCTION . | function AggregateSelectFunctionName! params [AggregateSelectElementInput!] | |
type AggregateSelectElementType! | The source type. | COLUMN FUNCTION |
AggregateSelectFunctionInput
An object containing the function to apply to the specified fields.
Field | Description | Enum Values | Supported Fields |
---|---|---|---|
function AggregateSelectFunctionName! | The function name. | AVERAGE BETWEEN CASE COLOR COUNT COUNT_DISTINCT COUNT_ITEMS COUNT_KEYS COUNT_SUBITEMS DATE DATE_TRUNC_DAY DATE_TRUNC_MONTH DATE_TRUNC_QUARTER DATE_TRUNC_WEEK DATE_TRUNC_YEAR DURATION_RUNNING END_DATE EQUALS FIRST FLATTEN HOUR ID IS_DONE LABEL LEFT LENGTH LOWER MAX MEDIAN MIN MIN_MAX NONE ORDER PERSON PHONE_COUNTRY_SHORT_NAME RAW START_DATE SUM TRIM UPPER | |
params [AggregateSelectElementInput!] | The arguments passed into the function. | as String! column AggregateSelectColumnInput function AggregateSelectFunctionInput type AggregateSelectElementType! |
AggregateResultSet
An object containing the result of the aggregate
query.
Field | Description | Supported Fields |
---|---|---|
entries [AggregateResultEntry!] | A list of results, each representing either a grouping key or an aggregated value. | alias String value AggregateResult |
AggregateResultEntry
An object containing the field's name and value.
Field | Description | Possible Types |
---|---|---|
alias String | The name of the field, as defined using the as field. Used to map the result to its corresponding expression. | |
value AggregateResult | The value returned for the given alias. Can represent a group-by key or an aggregated metric. | AggregateBasicAggregationResult AggregateGroupByResult |
AggregateBasicAggregationResult
An object containing the result of the aggregation function.
Field | Description |
---|---|
result Float | The result from the aggregation function. |
AggregateGroupByResult
An object containing the field's group-by value.
Field | Description |
---|---|
value_boolean Boolean | The group-by value for booleans. |
value_float Float | The group-by value for decimal numbers. |
value_int Int | The group-by value for whole numbers. |
value_string String | The string representation of the group-by value. |