Force content re-index for watched pages

Hey guys,
I’m working on a Forge app for Confluence.
I have to get all the pages and spaces watched by a User.

I tried without success the Confluence REST API but I didn’t find anything useful tbh.
I only found the CQL search “watcher=currentUser()”, but this method has a known bug: [CONFCLOUD-70064] Searching for watcher field via CQL yields incorrect results - Create and track feature requests for Atlassian products.

The suggested workaround seems to be to force the content re-index, but I didn’t find a way to do this (I know that the article talks about the re-index triggered by the interface, but I need to do it from the code).

Thank you for the help,