dataverse-client-python
dataverse-client-python copied to clipboard
Connection.get_dataverses only returns dataverses I have created?
I tried doing the following:
c = Connection('dataverse-demo.iq.harvard.edu', '...')
c.get_dataverses()
and found that this only returns one dataverse, which I created. Is there a way to access other dataverses on the server too? When I use the native API directly, I am able to list all dataverses on the server.
I believe this is a product of using the SWORD API to list Dataverses instead of the native API.
I would welcome switching over to the native API (there are other benefits as well), but I haven't done it because it would require a pretty hefty refactor of the Dataverse class and potentially the Dataset class as well.
@rliebz is right that the SWORD API only returns "your" data. In the DVN 3.x days this mean dataverses you were "admin" on. In Dataverse 4 we would like to move toward more granular permission checks as part of https://github.com/IQSS/dataverse/issues/1070 but this work is not complete so we generally use a permission that means the same as admin.
The Dataverse API provides other ways to list dataverses. Implementing the Search API as part of #21 is probably the best short term bet until the "contents" API can be sped up: https://github.com/IQSS/dataverse/issues/2122
Can confirm that Connection.get_dataverses() still does not return all dataverses. I like the idea of using the search API for now.