Skip to content
Last updated

Celonis Process Management API Filter

Filters can be part of the Uri and cause the server to return a filtered amount of data. For example, you can query all elements with a specific name specified in the filter.

Syntax

The filters are part of the Uri.

https://Server/Collection/Database/_api/rest/facets/processes/views/tree/elements/Origin Key of Category?$filter=name -eq 'mainProcess'

Type of filters / operations

Binary Operators

NameSyntaxTypeDescriptionExample
Equal-eqstringThe Boolean equality operator.?$filter=name -eq string

Function Operators

NameSyntaxTypeDescriptionExample
ContainsContains(string to be searched, substring to search)stringDetermines if one string occurs within another string.?$filter=contains(attributes, 'test')
EndsWithEndsWith(string to be searched, substring to search at the end of the first string)stringDetermines if the end of one string matches another string.?$filter=EndsWith(attributes, 'test')
StartsWithStartsWith(string to be searched, substring to search at the beginning of the first string)stringDetermines if the beginning of one string matches another string.?$filter=StartsWith(attributes, 'test')
IsNullIsNull(key to check for null)stringCompares the first operand with the null value. Compares if value null, empty or whitespace.?$filter=IsNull(attributes)

Operator Error

If you use an invalid filter operant, you get either a code 404 for an invalid uri or a hint that this operator is not implemented.

{
    "data": [
        {
            "error": "The operator Custom is currently not supported"
        }
    ],
    "message": "An error occurred.",
    "output": "Volatile",
    "type": "Error"
}

Queries

It is possible to create a query in which filters are used in combination. An example in which the value'mainprocess' in the name attribute is filtered and the value in the sate1 attribute does not correspond to'in progress'.

NameSyntaxTypeDescriptionExample
AndANDstringGroups operands with logical AND?$filter=name Equal string AND state1 Equal string
OrORstringGroups operands with logical OR.?$filter=name Equal string OR state1 Equal string

Query example

https://Server/Collection/Database/_api/rest/facets/processes/views/tree/elements/Origin Key of Category?$filter=name -eq 'mainProcess' AND state1 -eq 'in progress'

Other combinations are also possible.