When using the OCS API for Nextcloud, responses typically have a structure like this:
{“ocs”:{“meta”:{“status”:“ok”,“statuscode”:100,“message”:“OK”,“totalitems”:“”,“itemsperpage”:“”},“data”: {}}
The “ocs”/“meta” section contains two entries “totalitems” and “itemsperpage”.
For me these always showed up empty.
I assumed that when fetching a list of items (e.g. usernames, etc), once we hit a certain number, we get paged responses.
But when looking at the codebase, I don’t see any case where V1Response or V2Response objects get created with $itemsCount or $itemsPerPage other than NULL.
I tried with 350 users and always received the full list of ids. Perhaps this was not enough yet
So, when writing code that calls the API, do we ever need to check “totalitems” and “itemsperpage”?