I need an option other than webdav for 'curl'-ing my list of Nextcloud files

I have a ruby script which uses Net/Dav to crawl my Nextcloud site and create a JSON feed listing files+tags+comments. This JSON feed is used by our wordpress devs to create a read-only user searchable page listing available documents on our Nextcloud backend.

I’ve found this doesn’t scale however. For 50 files, it takes a couple minutes to run. Add 2000 files and 74 minutes later, I get a “500 Service Unavailable” error. I’m afraid it’s back to the drawing board.

It doesn’t seem that Sabredav is really made for this so I guess the next try will involve trying to piece together queries to the Nextcloud database tables directly. Any suggestions for creating this JSON feed?

1 Like