Please use this piece of code to get all references of a Asset:
String damPath = "/content/dam/geometrixx/offices/basel kitchen.jpg"; for (ReferenceSearch.Info info: new ReferenceSearch().search(resourceResolver, damPath).values()) { for (String p: info.getProperties()) { out.println("Path is "+info.getPage().getPath()); }
Let me know if you face any issue.