Hi Mathieu,
as far as your question regarding the service is concerned, I see in WmRoot package, wm.broker.sync:listOutOfSyncs; this service returns all the documents currently out of sync;
based on the output, and their syncState (status and source) you need to push to/pull from the broker.
since it is service in WmRoot package, it is undocumented and not a preferred approach to automate… but I am sure this will lead to a solution for you…
HTH,
Saurabh.
#webMethods#Integration-Server-and-ESB