PB with getting hosts depending on permission via REST API

CMK version: 2.4.0p18 cee
OS version: RHEL 9.7

Hi,

I’m using REST API for listing all hosts I need to see (depending on CG applied on hosts) with a specific user (role : Normal monitoring user). My hosts are located in a subfolder without any permissions on it. The Contact group permission is only applied on hosts I need to see.

With CheckMK 2.3.0p30, I was able to get all hosts with my Contact group (endpoint /domain-types/host_config/collections/all).

My CheckMK site as been updated in 2.4.0p18 version of CheckMK. Since, same request returns nothing. However, if a host is located in “/”, the request returns it.

How can I do to list hosts (located in subfolders) I need to see with the API?

No problem with GUI, I see only my hosts.

Thanks