Sync API / Way to access sync'd data

Hi! I’m looking to port over a twitter bot I wrote for my Roam Graph and am having trouble finding a way to access my sync’d Obsidian data. (I’m paying for the sync plan)

Is there a way to access this data via an API endpoint? From a little bit of reverse engineering, it seems that Obsidian is using websockets to do the actual syncing.

What I’m trying to achieve is a way to get access to “blocks” with specific tags, so I can tweet them out randomly. (I know blocks are not a thing in Obsidian)

10 Likes

+1 agreed this would be a value add to sync service

3 Likes

This sounds like a good idea; and I hope my following concerns are not interpreted as critical. I just think it would be good to get some assurances for the majority of people using Obsidian who wouldn’t use this functionality that it wouldn’t make their vaults, whether synced or not, potentially less secure.

Just figured I would put it out there. I am sure everything is fine, but because I don’t understand it completely, I am not completely sure, if you know what I mean.

Thanks!

It is a very good statement and would need to be very much part of the design.

I think the goal here would be the API is accessible through the Obsidian Sync service. So you have already opted in to your vault being stored in the cloud.

Second, since users can define their own encryption key, it would mean there are limitations about what could be read or written.

2 Likes

Exactly, even if there was an API endpoint to download a tar of the data, I would imagine, you would need the decryption key to go from blob data to markdown files.

I would also like this. I’m currently working with a workaround that has large drawbacks.

I have one computer that I use obsidian on most commonly, I wrote a script that gets executed every now and then to download new emails and copy them into my obsidian folder tree. In essence, using the filesystem as an API.

I believe this would be easier if you synced your obsidian vault with a service like Dropbox because you can then use their API, although this gets into really cumbersome territory quickly.

It works fine, but it’s a big drawback that you’d either have to replicate this script on all of your devices or have one device on (or a server) that runs this intermediary all the time.

1 Like

Same as others. It should be maybe great to have access to the Obsidian Sync service or provide software which able to sync to the Obsidian Sync service as a daemon service.

1 Like

Here’s my current workaround for others who stumbled on this issue. Currently, to get Obisidan mobile to work, you need either iCloud or Obsidian sync–I chose sync to be able to support the Obsidian team.

I also sync the same directory as my vault to Google Drive using the Google Drive desktop sync app. I can then use the GDrive API to get at the files and do as I please. Check the above source code to see how I do that. It’s not ideal but it works.

2 Likes

Definitely a very desired feature. Even a cutdown CLI version of obsidian that just does sync would be enough.

3 Likes

Thought about this today as well. I consider writing a Markdown Reader for iOS in its simplest form with holding and highlighting options. I want to make progressive summarization as simple and comfortable as possible with touch highlighting. But to enable this i would need to sync the vault via obsidian sync into the app.

I’m writing a plugin+express.js server with prisma and sqlite designed to be hosted free on render.com for this purpose. The idea is you sync your markdown notes to the server, then you can use those as posts at /api/blog for example. I am wanting to implement some auth before making it public. I would love to know if this would fill your use case.

+1 here, I’m currently building some automated tooling to parse my vault using airflow; at the moment, I am parsing against my local files and my airflow is run locally.

However, having an API for Obsidian Sync would allow automated parsing from standalone containers, which would be a very nice feature !

Any news regarding this feature?
I’m also want to have a way to externally add files to my obsidian. Let’s say I have web app, which creates md file. And I want that file to be in sync with all my devices.

As mentioned nowadays workaround is to sync that file to PC and then wait until I will be using that PC and only then sync that file to other devices - that’s not convinient

Providing an API is the missing capability that would cause me to sign up for Sync.

2 Likes

+1

I need to be able to interact with the contents of my vault programmatically, independently from Obsidian. Currently I’m doing this by syncing my vault to a git repo, and then I interact with the git repo using GitHub’s SDK. That allows me to create/edit/delete files in my vault.

Unfortunately I then need to “pull” my vault every time I open Obsidian. I can use the Obsidian Git plugin to make this easier (and it does help), but I’d be more than happy to pay for Obsidian Sync if I could interact with my vault programmatically / independently from Obsidian.

I basically just need CRUD + list operations for the files in my vault. If ya’ll had an SDK or API that I could use to interact with my Sync’d vault, I’d 100% use it and pay for Sync. (And if you make an API, I’ll happily write an SDK for you!)

2 Likes