Filtering Connectors with an API Query
All connectors types provided by UNIFYBroker/Micro Focus Content Manager offer the ability to filter entities managed by the connector. This is enabled by a configurable API query, which by default is *
. The API documentation provided by Micro Focus details the attributes of each object type that can be used in these queries, however the query syntax is not. This page outlines the known query syntax which can be used in constructing filter queries, however should not be considered exhaustive.
Query Structure
The structure of a query is one or more conditions separated by binary operators.
Conditions
A condition takes the form of a attribute, a operator, and a value. Operators are: =, <, <=, > and >=. Boolean typed attributes such as active
can be provided without an operator or value.
type=Person # Only locations of type 'Person' uri>5 # Only locations with a uri greater than 5 surname<=g # Only locations with a surname value that sorts before or is the provided value 'g' active # Only locations which are active.
A condition may be prepended by not
to negate its result.
not type=Person # All locations except those of the type 'Person' not uri>5 # Equivalent to <= not surname<=g # Equivalent to > not active # Only locations which are inactive.
Binary Operators
Binary operators include and and or.
type=Person or type=Organization # Locations which are either person or organizations uri>10 and not active # Locations with a uri greater than 10 which are not active
Binary operators are given precedence the closer left they are. Sections of a query can be enclosed in parentheses to assign a higher precedence.
type=Person or type=Organization and uri=4 # Locations which are either Person or Organization types, and have the uri of 4. type=Person or (type=Organization and uri=4) # All Person locations, and the Organization location with the uri of four uri=4 and type=Person or type=Organization # Location with the uri of 4 if that location is a Person, plus all Organization locations uri=4 and (type=Person or type=Organization) # The location with the uri of 4, provided the location is a Person or Organization
Customer support service by UserEcho
I was having trouble writing filters until I came across this excellent HPE Content Manager SDK 9.1 resource - in particular it allowed me to see what the underlying Name property was for the Based On Property that is surfaced by the Location connector schema discovery.