Reusing deleted Note IDs

Hi,

for Database Notefiles, is it possible to reuse the notee IDs that have been deleted?

I get {note-noexist} when checking for it, but {note-exists} when trying to add a new note but with a Note ID that has been deleted before.

Thanks!

Hey @Jakov,

Yes.

When you use the note.delete request, Notecard sets a deleted flag on the Note so that it can sync that deletion with Notehub. You can still view the delete-pending Note by running a note.get request and setting the deleted flag to true.

After you sync the deletion the Note ID becomes available again, and you can use it with note.add.

TJ

1 Like

Yes, this is what I have observed as well. I’ve just tested this moments after I posted the question, as I wanted to get an official confirmation.

So only after a sync, do we get to reuse the ID of a Note that has been previously deleted.

Thanks!