So, I didn't expect to access joplin's built-in note history through api, but to implement an external history system by continuously exporting all notes and resources to git. The problem with existing backup plugins is that incremental backups are not possible, so it is impossible.
Existing backup plugin
In any case, even if you can query the note history directly from sqlite, how do you think that no one wants to recover from a more distant history?