I need a copy of the associations between posts in another app. Is there a way to directly retrieve all associations between posts via API (e.g. toolset_get_associations) instead of querying the related posts of a specific post (toolset_get_related_posts)?
If not what way would you suggest to sync the associations?
Thanks for your help!
There are a couple of ways you can approach this, based on the overall structure and requirement of your app:
1. You can create a custom function to run periodically (using Cron) that loops through one of the post types in the relationship and fetch the attached posts to them and update the existing records to keep the data in sync.