Get a file's Obsidian Publish URI via the API


I tried to search in Obsidian API 0.16.3 and in this forum, but could not find, so I assume this feature does not exist in the API.

I’m developing a plugin named Shell commands and would like to add there a variable named e.g. {{obsidian_publish_uri}} so that the URI of a note file could be passed to executable shell commands.

This would need some way to obtain the Publish URI via the API (domain name + sitename + note path).


I have a note file named in my Shell commands documentation vault. I’d like to be able to get the following Publish URI via the API:

Thank you! :slightly_smiling_face:

I wrote a plugin for that, afaik there’s no API.
I think making an API also wouldn’t work because one can use multiple publish sites with one vault.

1 Like