dataverse-client-python icon indicating copy to clipboard operation
dataverse-client-python copied to clipboard

Connection.get_dataverses only returns dataverses I have created?

Open astrofrog opened this issue 10 years ago • 3 comments

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.

astrofrog avatar Apr 29 '15 10:04 astrofrog

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 avatar Apr 30 '15 12:04 rliebz

@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

pdurbin avatar Nov 30 '15 14:11 pdurbin

Can confirm that Connection.get_dataverses() still does not return all dataverses. I like the idea of using the search API for now.

SamiSousa avatar Mar 21 '18 00:03 SamiSousa