-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Dataverse v6.1 added "optional" limit and offset params to the List Versions of a Dataset API endpoint. See the endpoint description in the Dataverse API guide.
On Harvard Dataverse and Demo Dataverse, when I use this endpoint without using those limit and offset params, if there are more than 10 versions in the given dataset, only the latest 10 versions of the dataset are included in the API call's output.
For example, on Harvard Dataverse ,see https://dataverse.harvard.edu/api/datasets/:persistentId/versions?persistentId=doi:10.7910/DVN/GW2P3G.
On Demo Dataverse, see https://demo.dataverse.org/api/datasets/:persistentId/versions?persistentId=doi:10.70122/FK2/FSNVWV.
For datasets on Harvard Dataverse and Demo Dataverse that have over 10 versions, to see earlier versions, you must use the limit param to increase the number of versions retrieved, or use the offset param to get the next set of versions.
It's as if a default limit of 10 has been applied when using this endpoint on datasets in Harvard Dataverse and Demo Dataverse.
When I use this endpoint on 33 other Dataverse installations, on datasets that have more than 10 versions and without using the limit param, the metadata of all versions are included in the output, such as https://dataverse.ada.edu.au/api/datasets/:persistentId/versions?persistentId=doi:10.4225/87/PJO7GB for a dataset in the ADA repository.
The section of the API Guide that describes that API endpoint describes the params as "optional" and doesn't mention any default for these params or that we need to use them to see all versions. And there's nothing in that section that can explain why a user would need to use the param for datasets in some repositories, like Harvard Dataverse, but not for datasets in other repositories, like ADA. I couldn't find anything in the Configuration Guide that might explain this, although I'm less familiar with that guide so maybe I missed it?
In the v6.1 release notes we write that the pagination is optional.
Definition of done
Understand why users of some repositories, like Harvard Dataverse, need to use the limit and/or offset params of the "List Versions of a Dataset API endpoint" in order to see, in one API call, more than 10 versions of a dataset, but for other repositories, like ADA, the endpoint always returns all versions, even when the limit param isn't used.