GetObjectCountsAsync

Gets the count of objects of a specific type in a folder Returns ()

This method will count the number of items that match the object type name for a folder and, if selected, child folders.

General rule for type name is to drop the ‘info’, ‘item’, or etc off of it. This works for most object types. ex. BaseInfo is of type name Base.

Name Description
folder The folder to get object counts from
typeName The type of objects to count
includeChildFolders Whether to include counts from child folders

Get Object Counts Async

Example in C#

// Returns: Int64
var item = await client.GetObjectCountsAsync(FolderInfo folder, String typeName, Boolean includeChildFolders);

Example in CURL



           #In this example we are looking for how many controllers there are in a particular instance and its child folders.
           curl -X GET \
               'https://api.us.acresecurity.cloud/api/f/INSTANCE.KEY/counts?typeName=Controller&includeChildFolders=True' \
               -H 'Authorization: Bearer TOKEN_GOES_HERE'