How to list all the statements in the Linked / Unlinked mentions / backlinks using the Obsidian API?

I’m looking for a way to get all the linked / unlinked mentions generated by Obsidian for a file / leaf using its API. This is needed for a plugin I’m working on. Cannot find any information about it in the docs. Anybody could help?

Thanks!