You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At first, I just took a quick look at the project and that's exactly what I had in mind too. A simple, markdown alternative to ether pad.
To provide such an API (REST) it maybe would be the best to simplify the creation of a note. Let the server just creates the note if no one with the same name exits (like ether pad).
So we could build an URL architecture like:
/api/get/noteName
/api/write/noteName
/editor/noteName
For now, the creation of the note is /new, which I think is simple enough.
But currently the note id policy is the UUID encoded by base64.
So the only note name I can give to you is the "header1", which is the title of the note.
And maybe I will take /api be the prefix of the APIs.
Chiming in to say this is a top issue for me e.g. I want to be able to store todos in hackmd, or store a list of documents and get that list. This would also enable people to extend the platform a lot in interesting ways (e.g. push and pull between github files)
Also chiming in to say I really want to use hackmd, but this is a blocker for me. I need a way to create documents from a separate system and open them to edit in hackmd. Oauth is not necessary for my use case.
There's now the possibility to create a new note with content, see #673 for an example. Editing is not trivial, currently believe that "simply" using the Websocket and adding content via OT is the best option.
Reacted by Sheogorath, Fly Chang, DanielChen and Simon Ramstedt
In case anyone else is interested, I created a really ugly code spike for messing around with socketio and both clearing a pad and replacing it with template copy: https://github.com/patcon/hackmd-edits-test
fwiw, it currently only works if no one else has an active cursor on the pad (not sure why)
Activity
janniklorenz commentedon Jul 13, 2015
At first, I just took a quick look at the project and that's exactly what I had in mind too. A simple, markdown alternative to ether pad.
To provide such an API (REST) it maybe would be the best to simplify the creation of a note. Let the server just creates the note if no one with the same name exits (like ether pad).
So we could build an URL architecture like:
/api/get/noteName
/api/write/noteName
/editor/noteName
jackycute commentedon Jul 13, 2015
Thank you, that's a good proposal!
First, I refer to the API which now open by Hackpad
https://hackpad.com/ep/pad/static/k9bpcEeOo2Q
For now, the creation of the note is
/new, which I think is simple enough.But currently the note id policy is the UUID encoded by base64.
So the only note name I can give to you is the "header1", which is the title of the note.
And maybe I will take
/apibe the prefix of the APIs.Thanks again!
janniklorenz commentedon Jul 13, 2015
Thanks for the quick response, I will take a look at it later.
wonderchang commentedon Jul 3, 2016
+1
Jyny commentedon Jul 4, 2016
+1
ToniIltanen commentedon Nov 22, 2016
Any progress on creating an API to control the creation, updating and delete of the notes?
jackycute commentedon Nov 22, 2016
Not for now, maybe right after version 0.5.0
jackycute commentedon Feb 3, 2017
We'll need to build a OAuth process to allow programmatic usage.
Or an easy way is give every user a pair of key and secret like Hackpad did so.
wonderchang commentedon Mar 25, 2017
I prefer to provide a pair of key and secret to achieve it, and each authorized user could generate several key pairs for different application uses.
Why this feature would be implement after v0.5.0? Something fundamentals should be done before constructing Open API? (Just curious, not offense)
rufuspollock commentedon Apr 18, 2017
Chiming in to say this is a top issue for me e.g. I want to be able to store todos in hackmd, or store a list of documents and get that list. This would also enable people to extend the platform a lot in interesting ways (e.g. push and pull between github files)
tjcarroll11 commentedon May 24, 2017
Also chiming in to say I really want to use hackmd, but this is a blocker for me. I need a way to create documents from a separate system and open them to edit in hackmd. Oauth is not necessary for my use case.
RichardLitt commentedon May 24, 2017
I've built a module that can generate HackMD links. May prove useful, but it's not ideal. https://github.com/RichardLitt/generate-hackmd-links
rufuspollock commentedon Jul 16, 2017
@jackycute any thoughts or updates here :-) ?
iakat commentedon Feb 12, 2018
Any update re: an API to write to notes?
ccoenen commentedon Feb 13, 2018
There's now the possibility to create a new note with content, see #673 for an example. Editing is not trivial, currently believe that "simply" using the Websocket and adding content via OT is the best option.
patcon commentedon Mar 10, 2020
In case anyone else is interested, I created a really ugly code spike for messing around with socketio and both clearing a pad and replacing it with template copy: https://github.com/patcon/hackmd-edits-test
fwiw, it currently only works if no one else has an active cursor on the pad (not sure why)