As smacdonald2008 said it's very good article to get detail information over MSM API.
Here you have direct API url which helps you to achieve your requirement and code snippet.
LiveRelationshipManager ("The Adobe AEM Quickstart and Web Application.")
LiveRelationship ("The Adobe AEM Quickstart and Web Application.")
@Reference
private LiveRelationshipManager liveRelationshipManager;
try {
String sourcePath = liveRelationshipManager.getLiveRelationship(resource, true).getSourcePath();
} catch (WCMException exception) {
exception.printStackTrace();
}