Get list of notes and their aliases on Obsidian Mobile

Hi , I am new to the Obsidian API. I want to create a helper app on iOS that can edit notes. The app would require to know all the notes in the Obsidian vault and their aliases. I can read the vault iCloud folder directly and parse through all the files to get this information , however I wanted to know if there was a way I could communicate with the Obsidian app to get this information instead…

Also how can I get links which don’t have an associated note file yet ?

Hello!
Using the API: getMarkdownFiles - Developer Documentation & parseFrontMatterAliases - Developer Documentation

const allMarkdownFiles = this.app.vault.getMarkdownFiles();
const allAlias = [];
for (const file of allMarkdownFiles) {
 const frontmatter = this.metadataCache.getFileCache(file)?.frontmatter;
 if (frontmatter) {
  const alias = parseFrontMatterAliases(frontmatter);
  //do what you want here, for ex create a new object with the attached file + their alias
  allAlias.push({
     file,
     alias
   })
 }
}

For backlink, i don’t know :<

Thanks for the reply. This works for me ! I have seen a plugin that uses this and now understand how to implement this .

1 Like