Get sync status for a client remotely or via script?

Hi all. I am wondering if it is possible to get the status of a sync client either remotely or via a shell script. I have two use cases in mind:

  1. I have multiple computers that mount my nextcloud home directory from a local workstation that syncs using the client. I would like to be able to monitor the sync status without having to look at the workstation directly.
  2. I have some users that sync with the nextcloud client but they are not so good at reporting when the sync client is in a conflicted state or isn’t syncing. This leads to me having to clean up problems when they make a bunch of changes to files that then don’t sync.

In either case, I could solve this by either somehow getting the status of the sync client remotely or using a shell script to periodically check the sync status. Is this possible?

Hey Guys same here, but I need that script for my backupserver. Is it possible to get the status of a sync via shell script? Have someone an example script? I want to shutdown the Backupserver after backup. And the Backup can only start if the NC-client has finished the sync. I use Veeam for Backup if someone need to know. The Backupserver and the NC-server are not at the same location. On the NC-Server I’m only a user, no admin or root