Joplin API Endpoint to update notes

Is there a way to use the Joplin API to update the details of an existing note if the ID of the note is known?

I participate in CTF's and use Joplin to store the CTF Challenge details as a place to mark down what steps I took to solve the challenge, what worked for me and what didn't. The script I wrote for this purpose is here:

I would like to know if the ability to update existing notes is possible for two reasons:

  1. Sometimes the challenge details are modified to add clarity. I can detect this on line 235 where I hash the challenge details from the CTFD API and compare them to what I stored in the sqlite database during a previous execution.

  2. Once I solve a challenge, I would like to record the timestamp of when I solved the challenge.

Yes, this is possible:

  • Straight forward way would be to issue an HTTP request via curl: PUT /notes/:id. The API docs, including curl examples, are located here.
  • If you are familiar with python, you could use joppy: modify_note(id_, body="...")

Edit: I see you are using direct requests to the Joplin API in your script. I guess the most convenient way in your case would be something like requests.put("http://localhost:41184/notes/{}?token={}".format(note_id, JOPLIN_TOKEN), json=noteDetails).