Using webdav or plugin to restore a file that was deleted months ago

We are using owncloud server 10.15.2.

The last hurdle stopping us from fully switching from dropbox to owncloud is the ease at which dropbox can restore a deleted file.

Ultimate goal: Need guidance to find the best way to restore a file that was accidentally deleted an unknown amount of time ago. Thousands of files are deleted weekly. Deleted filename is known.

My idea was to writing a custom tool to filter deleted files by filename and then using the webdav api to restore the fileid. I am somewhat successful using the webdav trashbin api but am struggling to get the filename metadata if the fileid is in the trashbin.

I used curl to list the deleted files and extract their fileid

curl -u admin:password -H "Depth: 1" -H "Content-Type: text/xml" -X PROPFIND  "https://host/remote.php/dav/trash-bin/admin"

but running this to get the filename associated with the fileid fails

curl -u admin:password  --data "@meta-files.xml" -X PROPFIND "https://host/remote.php/dav/meta/<fileid>"

where meta-files.xml is

<?xml version="1.0"?>
<a:propfind xmlns:a="DAV:" xmlns:oc="http://owncloud.org/ns">
    <a:prop>
        <oc:meta-path-for-user/>
    </a:prop>
</a:propfind>

returns notfound exception unless I first manually restore the file using the web interface.