Retrieves sharing statistics for data collections shared out from the current site.
For each source data collection, returns the number of distinct target sites the collection is currently shared with. Use this when you need a per-collection sharing summary (for example, a "Shared with N sites" indicator) without retrieving the full list of sharing connections.
You can look up stats for up to 100 collections per call by specifying sourceDataCollectionIds.
Leave sourceDataCollectionIds empty to return stats for every source data collection on the current site
that has at least one active sharing connection.
When you specify sourceDataCollectionIds, the response contains one result per distinct provided ID.
A result has itemMetadata.success = true and stats populated when the collection has at least
one active sharing connection. Otherwise, itemMetadata.success = false with
itemMetadata.error.code = "NOT_FOUND".
To retrieve the full list of sharing connections (including target site and collection IDs), call
List Shared Data Collections
with sharedWithCurrentSite set to false.
Note: connectedSitesCount counts distinct target sites. If the same target site connects
through multiple policies, it is counted once.
You can only call this method when authenticated as a Wix app or Wix user identity.
This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.