# 4APQL - 4ALLPORTAL Query Language

4APQL is a 4ALLPORTAL specific query language similar to SQL and uses most of its syntax. 4APQL is reduced to 4ALLPORTAL relevant queries, tough, and offers some additional options, e.g. square brackets [ ] for dimensions.

4APQL can be used in the 4ALLPORTAL GUI instead of SQL conditions, e.g., to limit role rights conditions based, to define dashlet contents, or to specify webhook triggers. 4APQL is also used in backend processes, e.g., to perform searches.

# Supported Operators and Commands

To use 4APQL in the GUI, you can use the following operators (listed in order of their precedence):

Name Description
  • (
  • [
  • for grouping
  • for dimensions
  • <
  • >
  • >=
  • <=
  • =
  • !=
  • IN
  • NOT IN
  • LIKE
  • NOT LIKE
  • IS
  • IS NOT
  • MATCH
  • less than
  • greater than
  • greater than or equal
  • less than or equal
  • equal
  • not equal
  • in
  • not in
  • like
  • not like
  • is
  • is not
  • for full text searches
AND
  • and
OR
  • or

Like in SQL, you have further options to built your query:

  • Grouping: you can group parameters using ( )
  • Wildcard: you can use LIKE with % to represent any number of previous/following characters, or LIKE with _ to represent one single character

Precedence

The precedence is the order in which the supported operators are evaluated. The list above shows the precedence of 4APQL operators. Operators listed first in the list have a higher precedence. Operators listed together have the same precedence. Operators of the same precedence are processed from left to right.

# Example Statements

  • Limit a webhook trigger

    • mimetype = 'image/jpeg'
    • mimetype LIKE 'image/%'
    • mount = 'data' AND parent_path = 'flyer_24'
    • mount = 'data' AND (parent_path = 'flyer_24' OR parent_path LIKE 'flyer_/%')
  • Define a module's dashlet

    • created_by = '70394110-d808-4697-bb57-14a5cf36f0ge'
    • created_time > '2023-05-01T10:10:01.803Z'
Request missing documentation