Bulk entity queries.
Methods
# static list(params) → {Promise.<ServiceResponse>}
Queries entities of a given type with optional filtering, full-text search, and field projection.
entityType (required) — selects which entity collection to query:
'ou'— Organisational Units'person'— Persons'group'— Groups
filterModel — structured filter applied on top of the full-text search. Each item targets a field and an operator:
filterModel: {
logicOperator: 'and', // 'and' (default) or 'or'
items: [
{ field: 'data.active', fieldType: 'boolean', operator: 'equals', value: true },
{ field: 'data.name', operator: 'contains', value: 'GmbH' }
]
}
String operators: contains, doesNotContain, startsWith, endsWith, equals, isEmpty, isNotEmpty.
Boolean operators: equals, isEmpty, isNotEmpty.
Special virtual fields for relationship filtering:
__GROUPS__— filter by group membership (value:humanIdor array ofhumanId)__MEMBERS__— filter by group members__EMPLOYEES__— filter by employeehumanId__EMPLOYMENTS__— filter by employment OUhumanId__ROLES__— filter by role name across employees/employments
Relationship operators: includes (default) or excludes.
Special field aliases:
originalHumanId→ resolves tohumanIdcontacts.<type>→ resolves to the correct nested contact path (email,phone,mobile,fax)data.bankHistory→ resolves todata.bankHistory.iban
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
params |
Object
|
||
entityType |
'ou'
|
'person'
|
'group'
|
Entity collection to query. Required. |
|
fields |
Array.<string>
|
FieldMappingObject
|
<optional> |
Fields to return.
Always includes |
filterModel |
Object
|
<optional> |
Structured filter. |
quickFilter |
string
|
<optional> |
Free-text search string matched against ngram-indexed fields. |
searchSubEntities |
boolean
|
<optional> |
When |
hideInactive |
boolean
|
<optional> |
When |
idsOnly |
boolean
|
<optional> |
When |
sort |
Object
|
<optional> |
Sort configuration forwarded to Elasticsearch. |
Promise.<ServiceResponse>
Examples
// All active persons whose name contains "Müller"
const { result } = await customers.Entities.list({
entityType: 'person',
hideInactive: true,
filterModel: {
items: [{ field: 'data.lastName', operator: 'contains', value: 'Müller' }]
}
})
// OUs that belong to a specific group, with free-text search
const { result } = await customers.Entities.list({
entityType: 'ou',
quickFilter: 'Engineering',
filterModel: {
items: [{ field: '__GROUPS__', operator: 'includes', value: 'group-abc123' }]
}
})