Actions43
- Application Rule Actions
- Computer Actions
- Device Rule Actions
- Drive Rule Actions
- Entity Actions
- Group Actions
- Manage Schema Extension Actions
Entity → Get Count
AI-generatedSummary
Retrieve the count of entities of a specified type from DriveLock, optionally filtered and grouped.
Inputs
- Entity Name (required) — Select the type of entity to count, such as Computers, Devices, or Users.
- Filter Mode (required) — Choose 'Builder' to use a visual query builder with groups and conditions, or 'Raw Query' to specify an RQL filter directly.
- Top-Level Combinator — When using the visual query builder, select how to combine filter groups: 'AND' requires all groups to match, 'OR' requires any group to match.
- Filter Groups — Define groups of conditions to filter the entities when using the visual query builder mode.
- Raw Query (RQL) — Provide a raw DriveLock RQL query string to filter entities when using raw query mode.
- Additional Fields — Optional parameters such as grouping property, pagination (skip, take), whether to get total count, and other output formatting options like including linked objects, getting full objects, or flattened lists.
Output shape
a single object containing the count or grouped counts of entities that match the specified filters.
Supports filtering entities using either the visual builder or raw RQL query. Additional options allow grouping the counts by a property. Pagination parameters are ignored for counting, but groupBy is supported. Returns the API response deserialized, typically with a 'data' field containing count information.
Examples
Example 1: Count the total number of Computers with a specific status
Choose Entity Name 'Computers', set Filter Mode to 'Builder', define one Filter Group with conditions matching the criteria (e.g., field 'isLicensed' equals true), leave Additional Fields empty or default.
Example 2: Count how many Devices exist per vendor grouped by 'vendor'
Set Entity Name to 'Devices', Filter Mode to 'Builder' or 'Raw Query', optionally add filter conditions, set Additional Fields 'Group By' to 'vendor' to get counts grouped by vendor.