It is a known issue that the REST API in 6 does not supply total results when doing pagination (see DS-3887) which makes iterating the results an exploratory process. This problem is compounded by the fact that the REST API does an internal count, then responds with those items that are not restricted. This means that if you send an anonymous query like so: curl -s -H "Accept: application/json" https://demo.dspace.org/rest/items?offset=0\&limit=5" you will get 5 results provided they're all open to anonymous users if you then login to the server and pick one item and make it private and do the same query you will get 4 results even though the next query: curl -s -H "Accept: application/json" https://demo.dspace.org/rest/items?offset=5\&limit=5 would give you up to five results there are at the time of this writing 63 items in the demo server and I've made two of them private. the bug can be confirmed by doing a curl query like above with a low limit, selecting one of the items and making it private and then redoing the same query to see that the next record does not cascade down. |