Skip to main content

ConnectorEntityListFilterInput

Input

Narrows the entities of one namespace. previewConnectorEntities (as list.filter) is the searchable listing; listConnectorEntities rejects a non-blank searchQuery with UNIMPLEMENTED.

FieldlistConnectorEntitiespreviewConnectorEntities
ideq / ineq / in
refId, mappingKeyeq / inignored; use searchQuery
mergingStatethe first of eq, in, ne that is seteq, in and ne together, against the state the entity would have after this save
lastChangeDateevery operator set, so gte + lte is a closed range; an entity never merged matches no boundsame
lastChangeKindthe first of eq, in, ne that is setsame
searchQueryrejectedthe grammar below

searchQuery

Up to three parts, separated by whitespace, in any order, all combined with AND. Canonical order:

#tags gridv1:TOKEN free text

Free text

  • Split on whitespace; every word must appear, as a case-insensitive substring, somewhere in the entity. Word order does not matter.
  • Searched: refId, the exactType and baseType names, every context value, and every field value of any type (displayed, default and saved), including an entity reference's readable parts.
  • Platform ids (id, mappedId, mappingKey, legacyMappingKey, and the ids inside an entity reference) match only a word of 8 or more characters: a pasted id finds its entity, a short word such as 2 never matches every entity through a shared id prefix.
  • Never searched: sourceType, context keys starting with __, field slugs, labels and options, boolean values, and platform state such as mergingState (use the hashtags).

Hashtags

Case-insensitive and whitespace-bounded; several are combined with AND. Each keeps the entities carrying that tag in context.__preview.tags:

  • #selected: selected after this save.
  • #added: this save adds it to the graph.
  • #updated: already in the graph, and its values change (by a user, a rule, or the source system since its last merge).
  • #updatedFields: updated, and an entity property changes (a field value, a field no longer declared, or the base type). Includes a row whose context changes too.
  • #updatedContext: updated, and only the connector's source context changes. Together with #updatedFields it splits #updated in two, with no overlap.
  • #deleted: a user or a rule unselected it, so this save deletes it from the graph; never a missing entity.
  • #missing: merged, but the source system no longer reports it, so every save deletes it; never tagged deleted.
  • #firstSeen: first imported after the namespace's last save, selected or not; none until the namespace has been saved or merged once.
  • #unresolved: added or updated, with an entity reference pointing at nothing in the graph. It runs the graph check: if the check cannot complete, the request fails with ABORTED (retry) or RESOURCE_EXHAUSTED (too many references) instead of returning an empty page.

Any other #word, and a tag glued to another word (abc#added), is free text.

Grid token

A column filter and sort, at most one per query: gridv1: followed by the unpadded base64url encoding of this JSON (MUI X DataGrid's filter and sort models; other keys are ignored, both models are optional):

{
"filterModel": {
"items": [{ "field": "floor", "operator": ">=", "value": 2 }],
"logicOperator": "and"
},
"sortModel": [{ "field": "name", "sort": "asc" }]
}
  • logicOperator is and (the default) or or, over a flat list of items. sort is asc, desc, or null (ignored).
  • field is a field slug, @ followed by a context key (non-string values compare as their JSON), or one of the reserved keys refId, mappingKey, mappedId, legacyMappingKey. A field slug the namespace does not declare is ignored; a context key starting with __ is rejected.
  • Columns compare as numbers (FLOOR_LEVEL fields), by presence only (ENTITY_REF fields, whose names are resolved client-side; not sortable), or as text (every other field and key). Operators:
operator text number entity reference
contains, doesNotContain yes - -
equals, =, is / doesNotEqual, !=, not yes yes -
startsWith, endsWith yes - -
isEmpty, isNotEmpty yes yes yes
isAnyOf (value is an array) yes yes -
>, >=, <, <= - yes -
  • Values compare against the displayed value (after rules and unsaved edits). Text equality and isAnyOf ignore case and accents; contains, startsWith and endsWith ignore case only. Blank text counts as empty. An item with no usable value (missing, blank, NaN, an empty array) is ignored.
  • Sort keys apply in order: natural order ("Room 2" before "Room 10"), case-insensitive, empty values last in both directions, ties broken by entity id.
  • Filters and sorts the listing before pagination; never changes the counts.
  • Limits, counted before ignored fields are dropped: 50 filter items, 200 isAnyOf values summed over the whole query, 10 sort keys, and a 32 KiB encoded payload.
  • A second token, an unknown gridvN version, a payload that is not base64url JSON of this shape, an unknown operator, an operator the column cannot take, a sort on an entity reference, or a limit exceeded fails with INVALID_ARGUMENT and a message starting Invalid grid query:.

Example

For a namespace with fields floor (FLOOR_LEVEL), building (ENTITY_REF) and name (NAME): entities this save adds, on floor 2 or above, whose department context is IT or Facilities, with a building set, containing "lobby", sorted by name.

#added gridv1:eyJmaWx0ZXJNb2RlbCI6eyJpdGVtcyI6W3siZmllbGQiOiJmbG9vciIsIm9wZXJhdG9yIjoiPj0iLCJ2YWx1ZSI6Mn0seyJmaWVsZCI6IkBkZXBhcnRtZW50Iiwib3BlcmF0b3IiOiJpc0FueU9mIiwidmFsdWUiOlsiSVQiLCJGYWNpbGl0aWVzIl19LHsiZmllbGQiOiJidWlsZGluZyIsIm9wZXJhdG9yIjoiaXNOb3RFbXB0eSJ9XSwibG9naWNPcGVyYXRvciI6ImFuZCJ9LCJzb3J0TW9kZWwiOlt7ImZpZWxkIjoibmFtZSIsInNvcnQiOiJhc2MifV19 lobby

The token decodes to:

{
"filterModel": {
"items": [
{ "field": "floor", "operator": ">=", "value": 2 },
{ "field": "@department", "operator": "isAnyOf", "value": ["IT", "Facilities"] },
{ "field": "building", "operator": "isNotEmpty" }
],
"logicOperator": "and"
},
"sortModel": [{ "field": "name", "sort": "asc" }]
}
input ConnectorEntityListFilterInput {
id: IDFilterExpressionInput
lastChangeDate: TimestampFilterExpressionInput
lastChangeKind: ConnectorEntityChangeKindFilterExpressionInput
mappingKey: IDFilterExpressionInput
mergingState: ConnectorEntityMergingStateFilterExpressionInput
refId: IDFilterExpressionInput
searchQuery: String
}

Input fields​

FieldTypeDefaultDescription
idIDFilterExpressionInputEntity ids to keep, by eq or in.
lastChangeDateTimestampFilterExpressionInputWhen a merge last changed the entity in the graph; every operator set applies, so gte with lte is a closed range, and an entity never merged matches no bound.
lastChangeKindConnectorEntityChangeKindFilterExpressionInputWhat the last merge did to the entity; only the first operator set among eq, in and ne applies.
mappingKeyIDFilterExpressionInputMapping keys to keep, by eq or in; applied by listConnectorEntities only, previewConnectorEntities ignores it.
mergingStateConnectorEntityMergingStateFilterExpressionInputMerging states to keep; listConnectorEntities applies the first operator set among eq, in and ne, previewConnectorEntities applies all of them to the state the entity would have after the save.
refIdIDFilterExpressionInputSource-system ids to keep, by eq or in; applied by listConnectorEntities only, previewConnectorEntities ignores it.
searchQueryStringFree text, hashtag filters and an optional grid filter and sort token, honoured by previewConnectorEntities only (listConnectorEntities rejects it); see the type description for the grammar and an example.

Used by​