# March 20, 2025 - Added new query language function

**URL:** <https://community.cumulocity.com/t/march-20-2025-added-new-query-language-function/12050>\
**Category:** Platform services\
**Tags:** Feature, rest-api, platform-services\
**Created:** [March 21, 2025, 7:03am UTC](https://community.cumulocity.com/t/march-20-2025-added-new-query-language-function/12050 "2025-03-21T07:03:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [March 21, 2025, 7:03am UTC](https://community.cumulocity.com/t/march-20-2025-added-new-query-language-function/12050/1 "2025-03-21T07:03:45Z")

</div>

## Context

* * *

**Change Type:** Feature  
**Product area:** Platform services  
**Component:** REST API  
**Deployed at:** [eu.latest.cumulocity.com](http://eu.latest.cumulocity.com), [apj.cumulocity.com](http://apj.cumulocity.com), [jp.cumulocity.com](http://jp.cumulocity.com), [cumulocity.com](http://cumulocity.com), [us.cumulocity.com](http://us.cumulocity.com)

> **Technical details**
>
> **Build artifact:** cumulocity (2025.47.0)  
> **Internal ID:** MTM-61960

## Description

* * *

A new function `isinhierarchyof()` has been added to the [query language](https://cumulocity.com/api/core/#tag/Query-language).

The new function

- matches objects in the hierarchy of the object whose ID is passed as an argument.
- accepts one or multiple arguments.

**Example**

For a given hierarchy:

- Group g1
  - Subgroup s1
    - Object o1
    - Object o2

  - Subgroup s2
    - Object o3
    - Object o4

- `isinhierarchyof(g1)` - matches group `g1` and all of its descendants: `g1`, `s1`, `s2`, `o1`, `o2`, `o3`, `o4`
- `isinhierarchyof(s1)` - matches subgroup `s1` and all of its descendants: `s1`, `o1`, `o2`
- `isinhierarchyof(s2)` - matches subgroup `s2` and all of its descendants: `s2`, `o3`, `o4`
- `isinhierarchyof(o1)` - matches only object `o1`
- `isinhierarchyof(o3)` - matches only object `o3`
- `isinhierarchyof(s1,s2)` - matches both subgroups and their descendants: `s1`, `s2`, `o1`, `o2`, `o3`, `o4`
- `isinhierarchyof(o2,o4)` - matches objects `o2`, `o4`
