ddvk / rmfakecloud

host your own cloud for the remarkable
GNU Affero General Public License v3.0
751 stars 61 forks source link

listDocuments returns empty array #260

Closed doebi closed 1 week ago

doebi commented 11 months ago

Hi. I am in the process of building a standalone frontend for rmfakecloud and could require some inputs on the internals of the api interface.

I got the device registration with token refresh, etc all working, but when I request document-storage/json/2/docs I get an empty array as response.

In comparison, when I request integrations/v1/ I get a valid array with my configured cloud providers, which lets me assume the authentication and requesting is correct.

I don't know where to go from here, any comments appreciated. Thanks.

nemunaire commented 11 months ago

Hi @doebi!

The route /document-storage/json/2/docs is used by the old sync. The storage backend is not shared between the old and the new sync, that's why you got an empty array.

There is no drop-in replacement route: with the new sync, you should get the root file hash with /sync/v3/root, then retrieve the root file with /sync/v3/files/<FILE_HASH>. You'll see the list of the files, with the hash to request in the first column. You'll certainly just need to read files ending with .metadata.

:warning: Those routes are the one used by reMarkable and are subject to change to follow their use, this is perhaps not what you want, if you need something stable.