GUI: Search with AXIOM - EXAMPLES
Since 4.4
This functionality is available since version 4.4.
|
Midpoint provides multiple mechanisms to query data. This document provides basic information of AXIOM query language and examples of its usage in midPoint GUI.
The document is intended for users who understand midPoint concepts and architecture (IDM operators, administrators, engineers,…). They can use the AXIOM language in deeper analysis and searching for the objects and their relations in GUI.
Although this document specifies to GUI usage, AXIOM query language can be used not only there but also in other queries instead of XML query language.
Basic Information
Axiom Query Language is a language used to query objects in midPoint repository. It is a universal language used to search for objects in the repository, filter objects, set up object references and so on. The language closely follows midPoint data model. Names of the properties, attributes and all the data items are directly taken from midPoint data model (e.g. fullName, activation/effectiveStatus).
AXIOM provides following comparison operators: "=", "!=", "<", "⇐", ">", ">=" with their usual meaning. Strings may be compared also with "startsWith", "endsWith", "contains" and "fullText" operators (note: fullText operator requires configuration of fulltext index).
AXIOM provides also logical operators "and", "or" and "not". Execution of complex queries may be ordered using brackets "(" and ")".
Objects in midPoint are binded by relations (assignments, inducements, ..). AXIOM provides dereferencing mechanism with operator "@" which allows searching objects using attributes and values in the references. See examples below for usage.
You can create complex queries also using "match" operator and "exists" operator. See examples below for their usage.
More detail information and description of the operators can be found at Axiom Query Language documentation.
How to start
Basic search query is shown above each view by default. User can switch to AXIOM query by clicking the query button and choosing the Axiom query option.
Objects are searched in specific view in GUI. If user needs to search all objects of specific type, he has to select the relevant view (All users, All roles, All services).
Knowledge of internal structure of midPoint objects is necessary - at least basic names of attributes and basic understanding of assignment/targetRef attribute and roleMembershipRef attribute. If the user needs to find name of specific attribute, he can use Edit raw button on the object details page.
Search queries are case-sensitive. Query givenName = "John"
is different from givenName = "john"
Saved searches
User can save predefined useful filters for future use - by using Save filter button.
AXIOM Query Examples
Request | AXIOM Query | Details |
---|---|---|
Search by attributes in object |
||
Find users with specific given name |
|
|
Find users with last name starting with specific string |
|
|
Find roles with name ending with specific string |
|
Searching in All roles view |
Find service where Application URL extension attribute contains specific string. |
|
Attributes specific for the deployment are in objects stored as extension attributes in <extension> XML element. To search these attributes you need to include "extension/" in the attribute name. |
Find disabled users in All users view |
|
|
Search by attributes in referenced objects |
||
Find User with specific assignment |
|
The dereferencing operator "@" states that everything behind relates to the referenced object. |
Find User with service object indirectly assigned |
|
The indirect assignment of service object represents "access to application" |
Find users of specific archetype |
|
|
Logical operators in search |
||
Find all external users with specific given name. |
|
|
Search by dates and times |
||
Find all users created after particular date |
|
|
Find all users created on particular date (e.g. 19/10/2022) |
|
createTimestamp is datetime value. The value with time is larger just the date. 2022-10-22T01:05:13 that is larger than "2022-10-22" |
Find users modified in specific second |
|
|
Search through assignments or inducements |
||
Find users with specific roles directly assigned |
|
|
Find users with specific role assigned (directly or indirectly) |
|
roleMembershipRef contains both direct and indirect assignments. Note: roleMembershipRef may not be up-to-date if the role definition was updated and it’s members were not recomputed. |
Find users without any service assigned (directly or indirectly) |
|
roleMembershipRef contains both direct and indirect assignments. |
Find users without any role or service assigned (directly or indirectly) |
|
|
Roles without any inducement |
|
exists operator with not operator together. |
Find users without any role or service directly assigned |
|
Assignment attribute contains direct assignments only. Query is rather complex, because each user has at least one assignment assigned - archetype assignment. |
Users with account on specific resource |
|
Resource is identified by OID Note: For detail explanation of the query please check additional Example AXIOM queries page. |
Users with account on specific resource |
|
Like previous query, just the resource is identified by resource name. |
Referencing (supported since version 4.6) |
||
In roles view, find all roles that are assigned to specific user |
|
Dot is important in the query. |
Searching in All accesses panel (supported since version 4.7) |
||
All assigned roles |
|
You can also use ServiceType for services or OrgType for organizational units. |
All accesses starting with gallery in the display name |
|
The view shows display names of the objects. So search for name element could bring confusing results if name and displayName are different. |
All applications where the user has access |
|
This searches for all references with archetype named "Application". The same way you can search for "Application role" or "Business role". |
Searching in user assignments |
||
All roles assigned directly |
|
|
All assignments (roles or other) with name starting with "C" |
|
NOTE: Dereferencing (search with @) is working in the assignment panel only when repository search is enabled. This is not enabled by default. |
See Also
-
midPoint Query - Query concepts in midPoint
-
Axiom Query Language - Main page of AXIOM query language.
-
Example Axiom Queries - Additional examples with more detail explanation.
-
Expressions in Axiom Query - Expressions in AXIOM queries.
-
Axiom Concepts - Developers documentation - detail concepts of AXIOM query language.