I'm developing a cloud page for previewing emails by searching for their names. I use the /asset/v1/content/assets/query endpoint to search for the email name and retrieve the legacy ID needed for a subsequent call. The API call works well when searching for emails created by the parent Business Unit (BU). However, I also need to retrieve the legacy IDs of emails created by child BUs. These emails are shared with the parent BU and are located in a folder structure under a shared folder.
Currently, my query only searches for emails within the local folder. While specifying a specific folder to search in is an option, it's not practical as new folders are constantly being added to the shared folder structure.
How can I retrieve the legacy IDs of emails created by child BUs that are located in any folder under the shared BU (with the emails and folders shared with the parent BU)?