I am using Nextcloud via a hosted solution with Hetzner Storage Share. Earlier this week, they upgraded to version 31.0.8. I think this may have made a small change to the way the APIs work, which has broken something I use.
I have been using the Python API (from an Ubuntu 24.04 server) to periodically check how much free space I have and warn me if I am approaching my limits. I did this by calling the get_user() function of the Python API, which returns a JSON collection of information about my account. If I look within that JSON at [‘quota’][‘free’] it would give me the number of bytes of free space I have, which is what I need.
In the last couple of days, that behaviour has changed, which I assume (though can’t be 100% sure) is a result of the upgrade to 31.0.8.
Now, the free space is reported as -3, which I believe is a code for “unlimited”.
I have attempted to work around that by setting my user quota to 5 TB, which is the total space I have available on my storage plan.
Now it does report the number of bytes of free space, but it’s different from before: previously, it was what was left not only after my active files, but also any deleted files that hadn’t yet been permanently deleted.
Now the free space doesn’t take account of the deleted files, and reports all the free space that would be left if all my deleted files were to be permanently deleted.
I like keeping my deleted files for a little while in case of mishaps, so including them in the space calculation seems necessary.
Is there any way in which I can use the Python API to calculate how much free space I actually have, rather than how much free space I would hypothetically have if I were to immediately permanently delete all my deleted files?
Many thanks in advance.