Roam-Research / issues

Roam Research - A note-taking tool for networked thought.
https://roamresearch.com/
303 stars 7 forks source link

Roam API #145

Open agentydragon opened 4 years ago

agentydragon commented 4 years ago

Describe the problem

Roam would be way more useful for me if I could integrate it into other systems that I use with an API. It would allow me to actually interlink a large part of my digital life into the Roam knowledge graph.

Sorry if I'm duplicating this. I didn't find any issue with the "API" string on this GitHub repo. If there's already discussion/status updates about this going on somewhere, I'd appreciate if you could share the link.

Here's a few examples of apps that I think would be good to integrate, and what you could do with it:

Feature implementation

Here's my wishlist for what the API should allow, roughly by priority:

steveraysteveray commented 4 years ago

SPARQL could work. Also GraphQL is a possibility that might be easier to integrate, since it speaks JSON. But definitely on board with the idea of a query language!

agentydragon commented 4 years ago

Also, to mention more explicitly something I sort of put between the lines:

I'd like it if Roam mapped well into RDF data (https://en.wikipedia.org/wiki/Semantic_triple) and into the Linked Data ecosystem - i.e., nodes that are URLs, typed edges, typed nodes. There's a whole ecosystem and standards for interlinking databases from different sources, querying, existing standard language for describing types and definitions of common types, etc.

Roam's model of "nodes are basically a nested bullet list" does not fit into it directly at the moment. Linked Data edges have to be typed and directed. Roam edges are not typed and bidirectional (except attributes). But I think it could be fit reasonably well.

Linked Data conformance is orthogonal to having an API. But still, using Linked Data as a base would allow Roam to benefit from all the experience and standardization work that's gone into it. It might take a bit to shoehorn Roam to fit that model, but it might save a bunch of wheel-reinvention.

steveraysteveray commented 4 years ago

I don't think it would be hard to map to RDF. Basically something like:

jontaylor commented 4 years ago

Without API support

What you can do with an API

As a user who makes use of Roam for use in an executive role, I am becoming increasingly aware that I may not be part of the targetted user base. It makes me anxious about if an investment of time into this is a smart move. Some idea of the direction or intended user base would be useful.

artpi commented 4 years ago

I really hope for a "real" API. In the meantime, I'm working using this: https://github.com/artpi/roam-research-private-api

fivestones commented 4 years ago

Excited for this feature to come out!

samching commented 4 years ago

Any updates on this?

agentydragon commented 3 years ago

Thanks @artpi for the repo. I've ported a bit of it into Rust and played around a little.

Roam devs: window.roamPrivateAPI as it exists right now only lets us do things within a running Roam tab. That's not a good developer experience, for at least these reasons:

Please, implement support for some API that is easy to talk to outside a browser, like a REST or WebSocket API. (Or if that's not possible for some reason, at least a JS client library that wouldn't require a browser to run. I'd prefer to not have to launch a JS runtime to talk to Roam, but it's at least better than having to spawn Chrome.)

For extra dev experience points, it would be nice if you could do basic operations (like "add block", "get block text") without having to construct/parse EDN, because most programming languages are not Clojure. But using some an EDN parser library is less of a pain than launching a background browser...