Bulk entity queries.
Methods
# static list(params) → {Promise.<ServiceResponse>}
Queries entities across one or more types with optional filtering and field projection.
entityTypes (required) — one or more entity collections to query:
'ou'— Organisational Units'person'— Persons'group'— Groups
filterModel — structured filter:
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
|
||
entityTypes |
Array.<('ou'|'person'|'group')>
|
Entity collections to query. Required. |
|
fields |
Array.<string>
|
FieldMappingObject
|
<optional> |
Fields to return.
Always includes |
filterModel |
Object
|
<optional> |
Structured filter. |
hideInactive |
boolean
|
<optional> |
When |
sort |
Object
|
<optional> |
Sort configuration forwarded to Elasticsearch. |
Promise.<ServiceResponse>
Example
const { result } = await customers.Entities.list({
entityTypes: ['person'],
hideInactive: true,
filterModel: {
items: [{ field: 'data.lastName', operator: 'contains', value: 'Müller' }]
}
})
# static search(params) → {Promise.<ServiceResponse>}
Searches entities of a single type using the full entity graph query engine.
Unlike Entities.list, this targets a single entityType and adds full-text search,
sub-entity search, and idsOnly projection. For multi-type queries without these
features, use Entities.list instead.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
params |
Object
|
||
entityType |
'ou'
|
'person'
|
'group'
|
Entity type to search. Required. |
|
fields |
Array.<string>
|
FieldMappingObject
|
<optional> |
Fields to return.
Always includes |
filterModel |
Object
|
<optional> |
Structured filter (same schema as |
quickFilter |
string
|
<optional> |
Free-text search against ngram-indexed fields. |
searchSubEntities |
boolean
|
<optional> |
Extends |
hideInactive |
boolean
|
<optional> |
Exclude entities where |
idsOnly |
boolean
|
<optional> |
Return only |
sort |
Object
|
<optional> |
Sort configuration forwarded to Elasticsearch. |
Promise.<ServiceResponse>
Example
const { result } = await customers.Entities.search({
entityType: 'person',
quickFilter: 'Müller',
hideInactive: true
})