Hello, I really want to use Joplin API via AHK in Windows.
This is what I have so far. It gives me all id's and titles. But I'm fighting to find Joplin documentation for PUT (append) the body of a default note. Anyone that can point me in the right direction?
Another question is: Are there other/better ways to use the API than by PUT and GET ?
I see usage of curl, and some programming. Where to start and where to go ?
Thank you for the quick reply ! This is fine, like I suspected. The problem is that I also can't find the syntax to PUT (replace) a current body. I suspect it is done via the ID somehow ?
This exact example I have tested. It creates a new note each time I run it. If I get you right, It will not create a new, but update, If I also add the ID ?
I don't know as I haven't used AHK in years and I expect you need to get all the quotes right and escape what should be escaped. For this you might have better luck in the ahk forum.
Sure I might try there instead. However maybee MSXML2.XMLHTTP.6.0 is not the way to run the API. I find little documentation about it. I might try to run commandline with curl command from AHK instead, since Joplin has much more documentation using this method.
I now tried the example with the curl command you linked to. curl --data '{ "id": "00a87474082744c1a8515da6aa5792d2", "title": "My note with custom ID"}' http://127.0.0.1:41184/notes
However this generates an error message. Unexpected token ' in JSON at position 0
Do you know why ?
Finally I got it to work on windows. To implement in AHK, still fighting on the AHK forum to find best way to implement. Only the json part should be escaped. Why is this not mentioned in the documentation. I guess it depends on operating system, and documentation is only for Linux. But to me this was not clear.
curl -H "Content-Type: application/json" -X PUT http localhost:41184 /notes/00a87474082744c1a8515da6aa5792d2?token=XXXXX Broken Link for safety -d "{\"title\":\"New Value on Old Post\", \"id\":\"00a87474082744c1a8515da6aa5792d2\"}"