Run Aggregation Pipeline
aggregateRun read-only MongoDB aggregation pipelines to analyze and transform data without modifying the database.
Instructions
Run a read-only MongoDB aggregation pipeline on a collection ($out and $merge are not allowed)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | No | Optional database to read from for this call only, without changing the active connection | |
| pipeline | Yes | Pipeline stages as Extended JSON, e.g. [{"$match": {"status": "active"}}, {"$group": {"_id": "$type", "n": {"$sum": 1}}}] | |
| collection | Yes | Collection name |