Data API question: Delete folder: what about the descendants?

Hello.
The data API documents how to delete a folder:

DELETE /folders/:id:link:
Deletes the folder with ID :id

But it doesn't state about the descendant folders and notes.
Are those descendants recursively deleted? Or will they finished orphans and will be deleted after a safety period?
Or do I need to delete them recursively if I want everything to be deleted?

Thanks in advance for any help.

I think the easiest way is to test and see.

:wink:
I'll do, but since I don't really know what will happen to orphan notes (if any), I've asked. Probably the devs of that feature can answer. And the API doc could be updated for future readers.

If I can test before an answer here, I'll post.

Nothing, as far as I know.

Looks like when you delete a folder and try to sync Joplin will mark all notes in that folder as conflicts.

Even if it does, you can check it out. This is a simple tool page

https://joplin-utils.rxliuli.com/joplin-batch-web/#/checkParentNotebook

Hell.
Thanks for your answers.
@rxliuli : your batch web is cool !! I've bookmarked it and it helped, and will help.

So I did the test: if I create a notebook tree like that:
NB1 = a root notebook
NB1.1 = a notebook with NB1 as parent.
NB1 contains note1
NB1.1 contains note1.1
note1 contains a ressource
note1.1 also

If I delete NB1 through data API (endpoint DELETE /folders/:id), it results to delete everything below NB1 but the ressources. In other words: notebook and all its descendant notebooks and notes are deleted. But the ressources remains, orphans, and indeed, are found are found as such in your tool, @rxliuli .

I'm glad this tool can help you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.