Run Aggregation Pipeline
POST {{URL_ENDPOINT}}/action/aggregate
You can even run aggregation pipelines with the Data API. To do so, use the /aggregate endpoint and specify your pipeline in the pipeline field of the request body.
Request Body
{"dataSource"=>"{{DATA_SOURCE}}", "database"=>"{{DATABASE}}", "collection"=>"{{COLLECTION}}", "pipeline"=>[{"$sort"=>{"age"=>1}}, {"$limit"=>1}]}
HEADERS
| Key | Datatype | Required | Description | 
|---|---|---|---|
| Content-Type | string | ||
| Access-Control-Request-Headers | string | ||
| api-key | string | ||
| Accept | string |