This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Runs an aggregation pipeline on a data collection and returns the results.
Aggregations enable you to perform advanced data calculations, transformations, and groupings. While aggregate()
allows you to perform basic aggregations, aggregatePipeline()
allows you to perform advanced aggregations sequentially in stages, with each stage transforming the results of the previous stage.
To call the aggregatePipeline()
method, specify the collection ID and an aggregation pipeline. To build the pipeline, call the pipelineBuilder()
method and chain PipelineBuilder
methods to add stages and configure paging.
The method runs the pipeline and returns the aggregated results and pagination information.
Note: You can only build an aggregation pipeline for collections created in the CMS or with the Data Collections API. They cannot be used on Wix app collections or external collections.
ID of the collection to run the aggregation pipeline on.
Aggregation pipeline with data processing stages and paging configuration. Call pipelineBuilder()
to build the pipeline.
Options for running the aggregation pipeline.
This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.