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
Hi @jakubgs! There's not really much documentation, mostly because we don't really have a defined API in that sense(, yet!). If you wish, we could discuss things over in our matrix channel. Or you could describe what you'd like to achieve in a ticket here or in CodiMD itself and we could give you pointers on where to look.
@ccoenen if you know of an endpoint like https://<codimd_server>/<note_id>/edit that lets us push raw markdown that would probably do the trick, although it will likely require auth unless the permissions are set to Freely.
Right now, there is no /edit endpoint. Editing is a little tricky, because you'd also need to inform possibly connected users at the same time. And push them a diff of the document (or at least have them reload the document).
@jakubgs what you might be able to do, if your instance is configured for it, is POST a document to an alias url. So if /list-of-star-wars-collectibles does not yet exist, a new note might be created, and its alias could be list-of-star-wars-collectibles with the content in your POST body. More info can be found here: hackmdio/codimd#673 there it is deschribed for the /new endpoint, but it might be working for any url. If it is not working for any URL, yet, it might be very simple to enable that.
To migrate over content of a fairly big Etherpad Lite installation, im interested in adding documents to a given note_id as well. Unfortunately, it does not work by just POST'ing to /desired-name as proposed @ccoenen
Closing this as the API documentation discussion should happen over in the main repo. I've also added a list of the endpoints used by the CLI to the readme. Once an /edit endpoint is added to codimd-server we can open an issue back here to add support for it in the CLI.
Activity
ccoenen commentedon Oct 17, 2018
Hi @jakubgs! There's not really much documentation, mostly because we don't really have a defined API in that sense(, yet!). If you wish, we could discuss things over in our matrix channel. Or you could describe what you'd like to achieve in a ticket here or in CodiMD itself and we could give you pointers on where to look.
pirate commentedon Oct 18, 2018
Here are some of the undocumented endpoints that may interest you @jakubgs:
https://<codimd_server>/history(requires auth)https://<codimd_server>/newhttps://<codimd_server>/<note_id>/publishhttps://<codimd_server>/<note_id>/downloadhttps://<codimd_server>/<note_id>/pdfhttps://<codimd_server>/<note_id>/slideI've added them to the README here: https://github.com/hackmdio/codimd-cli/blob/master/README.md#api-endpoints
jakubgs commentedon Oct 18, 2018
Hey, I'm getting on a flight so I won't be responding for a while but what I wanted are two things:
I'll look at the code later, maybe during the weekend.
pirate commentedon Oct 18, 2018
@ccoenen if you know of an endpoint like
https://<codimd_server>/<note_id>/editthat lets us push raw markdown that would probably do the trick, although it will likely require auth unless the permissions are set toFreely.ccoenen commentedon Oct 18, 2018
Right now, there is no
/editendpoint. Editing is a little tricky, because you'd also need to inform possibly connected users at the same time. And push them a diff of the document (or at least have them reload the document).@jakubgs what you might be able to do, if your instance is configured for it, is
POSTa document to an alias url. So if/list-of-star-wars-collectiblesdoes not yet exist, a new note might be created, and its alias could belist-of-star-wars-collectibleswith the content in your POST body. More info can be found here: hackmdio/codimd#673 there it is deschribed for the/newendpoint, but it might be working for any url. If it is not working for any URL, yet, it might be very simple to enable that.andristeiner commentedon Oct 23, 2018
To migrate over content of a fairly big Etherpad Lite installation, im interested in adding documents to a given note_id as well. Unfortunately, it does not work by just POST'ing to
/desired-nameas proposed @ccoenenpirate commentedon Nov 23, 2018
Closing this as the API documentation discussion should happen over in the main repo. I've also added a list of the endpoints used by the CLI to the readme. Once an
/editendpoint is added to codimd-server we can open an issue back here to add support for it in the CLI.