midPoint Query Language

Last modified 10 Jun 2025 08:46 +02:00

MidPoint Query Language (MQL) is a complex yet universal language that is designed to query searchable objects in the midPoint repository. It enables skilled users and midPoint professionals to search for objects, filter them, set up object references, etc.

The language closely follows the midPoint data model which defines the names of properties, attributes, and all data items.

For more details, refer to Introduction to midPoint Query Language.

Scope of Use

MQL can be used in:

GUI

MQL is available as an advanced version of the search functionality in all views.

Access it by opening the search drop-down menu and selecting Advanced. By default, search is set to Basic to be easier to use by end users.

Select Advanced query

Try searching for all users whose given name starts with the letter "T" in the Users page. Type the following in the search bar and click the search button: givenName startsWith "T"

For examples, refer to Query Examples.

Configuration

MidPoint Query filters can be used in any configuration. In XML configuration files, MQL is wrapped inside the <text> child element of the <filter> element.

For example, the givenName startsWith "T" query is stored in midPoint configuration as follows:

midPoint Query in the XML configuration format
<query>
  <filter>
    <text>givenName startsWith "J"</text>
  </filter>
</query>
midPoint Query in the YAML configuration format
filter:
  text: givenName startsWith "J"
midPoint Query in the JSON configuration format
"query" : {
  "filter" : {
	"text" : "givenName startsWith \"J\""
  }
}

midPoint Studio

Midpoint Studio is a great tool that helps midPoint engineers and administrators with midPoint configuration. See how to use MQL in midPoint Studio.

Query Playground

You can experiment with MQL queries in Query Playground and Query Converter. Also, you can convert your existing configuration to MQL using Query Converter.

Transition from XML to MQL

MQL, formerly known as Axiom Query Language, was developed as a replacement for the XML-based query language as a part of the midScale project. Although XML is conceptually based on Axiom data modeling, MQL is more natural, user-friendly, and better aligned with that model.

MQL was introduced in midPoint 4.3, and except for embedded expressions, it was fully supported in midPoint 4.4 LTS. Since midPoint 4.5, MQL is fully supported and is the recommended option.

MQL fully replaces the XML-based query language which, although still supported, is considered deprecated. If you are using the XML-based query language, migrate to MQL as soon as possible.

Was this page helpful?
YES NO
Thanks for your feedback