AggregateAsJsonAsync

Performs a MongoDB aggregation query and returns results as JSON Returns ()

Combine the specified Data into JSON

For a guide on how to use aggregation please look at: Using Aggregates

Name Description
folder The folder to run the aggregation in
collectionName The name of the collection to aggregate
operations The MongoDB aggregation pipeline operations
queryTimeout The query timeout in seconds
jsonStrict Whether to use strict JSON formatting
includeGlobal Whether to include global scope items
hints Index hints. Use to suggest a possible existing index.

Aggregate As Json Async

Example in C#

// Returns: IEnumerable<String>
var item = await client.AggregateAsJsonAsync(FolderInfo folder, String collectionName, BsonDocument operations, Int32 queryTimeout, Boolean jsonStrict, Boolean includeGlobal, String hints);

Example in CURL



           #This has a very simple query
           curl -X POST \
               'https://api.us.acresecurity.cloud/api/f/INSTANCE.KEY/aggregate/ControllerInfo?queryTimeout=600&jsonStrict=False' \
               -H 'Authorization: Bearer TOKEN_GOES_HERE'
               -H 'Content-Type: application/json' \
               -d '["{ }"]'