Aggregate Query API documentation version 1.1
https://{customized.host}/{version}
- customized.host: required(string)
- version: required(1.1)
/aggregate/{className}
aggregate opertion
aggregate query
get /aggregate/{className}
aggregate query
通过应用的 MasterKey 鉴权
URI Parameters
- className: required(string)
Query Parameters
- where: (string)
A URL encoded json string of query conditions, please refer to storage API for more query examples.
Example:
{ "orderCount": { "$gte": 5 } }
- distinct: (string)
distinct attribute name.
Example:
pubUser
- resultClass: (string)
distinct attribute value type. Generally it is not to specific this parameter, unless backend server couldn't infer the data type correctly.
Example:
Integer
- addFields: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- bucket: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- bucketAuto: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- collStats: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- count: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- facet: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- geoNear: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- graphLookup: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- group: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- indexStats: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- listSessions: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- lookup: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- match: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
Example:
{ "pubUser": "LeanCloud官方客服" }
- merge: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- planCacheStats: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- project: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
Example:
{ "pubUser": 1, "_id": 0 }
- redact: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- replaceRoot: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- replaceWith: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- sample: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- set: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- sort: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- sortByCount: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- unset: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- unwind: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- out: (string)
aggregate operator. please refer to Mongo Aggregate Documentation for more details.
- skip: (integer - default: 0)
- limit: (integer - default: 100)
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{"results": [ {
"pubUser" : "LeanCloud官方客服"
}, {
"pubUser" : "LeanCloud官方客服"
}, {
"pubUser" : "LeanCloud官方客服"
}
]
}
Secured by appMasterKey
Headers
- X-LC-Id: required(appId)
- X-LC-Sign: required(string)
请参考「更安全的鉴权方式」来提供 sign, https://leancloud.cn/docs/rest_api.html#hash-1794863242
Example:
e074720658078c898aa0d4b1b82bdf4b,1453014943466,master
HTTP status code 401
如果鉴权失败会返回 401 错误。