Skip to main content

Aggregation Query

POST 

/collections/:collectionName/documents/aggregations

Perform complex data analysis using MongoDB native aggregation pipelines. Supported stages include: $match, $group, $project, $sort, $limit, $skip, $unwind, $lookup (admin permissions only), $addFields, $count, $sample, $bucket, $bucketAuto, $geoNear, $replaceRoot, $sortByCount.

Auto-limits: $limit: 20 is automatically added when not specified. Under PRIVATE permissions, $match: {_openid: "xxx"} is automatically added.

Request

Path Parameters

    collectionName stringrequired

    Collection name

Body

required
    pipeline object[]required

    MongoDB native aggregation pipeline array, each element is an EJSON object containing a single aggregation stage

Responses

Aggregation query successful

Schema
    list object[]

    Aggregation result list (EJSON format)

Loading...