-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As a dataverse user, I would like to get info about access restrictions on file level through the API #4645
Comments
@LauraHuisintveld thanks for opening this issue and for linking back to the thread on the dataverse-community list. I added this issue to the list at #3440 but the more I think of it, the more I think I might need some clarification on which information you you want access to. An example might help. Let's look at https://dataverse.harvard.edu/dataset.xhtml?persistentId=hdl:1902.1/00875&version=2.0 and a file with an id of "2841767" within in. Here's the file. Note that you see "Terms of Use" if you try to download it: I was confused about this at first, but "Terms of Use" are defined once at the dataset level: That is to say, all files have the same "Terms of Use" because they're defined in the parent, the dataset. As you observed (and as I think I said wrong in my reply on the forum), you can retrieve "Terms of Use" via API like this (truncated example reformatted a bit):
You can also retrieve the license ("NONE") in this case:
And for an individual file (file "0" below, the first in the output), you can see if it's restricted or not:
Can you please add a screenshot showing which information from the GUI you aren't able to retrieve via API? Thanks! |
fyi: this can be combined with #4616, which is also about getting file-level information via the API |
Also, please note, this particular area (terms, access, restricted) is being revamped with the support for confidential, sensitive data. While it may make sense to address the particular request (whether a file is restricted or not), it will definitely be handled as part of 5.0. |
@scolapasta Good to hear this gets some attention in version 5.0. @pdurbin : I will give you some more context about my question. One of our institutions that uses DataverseNL is using the API to get metadata from their datasets into their own Institutional repository. I am not sure how they do it, but I guess they do not want to make an API call for every single file to see if it is restricted. If you look at this output: https://dataverse.nl/api/datasets/:persistentId/?persistentId=hdl:10411/IW15PI you will get all metadata you might need, also info on file level. But what is missing here is information about if a file is restricted or not. So yes, you can see if a file is restricted or not, but only with a specific call. (Maybe this is related to a somewhat bigger issue. Within the same dataset, you can have Open Access files and restricted files, but you can only set Terms of Use/licence on the dataset level. |
Wait, I now see a difference between our output. this does show if a file is restricted or not, whereas that specific line is missing for DataverseNL datasets. Your example: We are currently on version 4.6.1, is this something that has changed in the higher versions? |
@LauraHuisintveld ah you're on 4.6.1. @ferrys added the ability to restrict files via API (and see if they are restricted) in fa3ca3f and perhaps other commits, which was pull request #3967 which landed in 4.8. See also #3873. The bottom line is that if you upgrade to 4.8 or higher, your JSON output should be similar and should show that "restricted" boolean. Thanks for providing all this detail. |
I should have mentioned earlier which version we are using.. Thanks for the replies! |
@LauraHuisintveld yes, I'll go ahead and close it. I linked to it from #3440 (with a |
I would like to retrieve information about access restrictions on file level with the API.
I do see the Terms of Use and the licence information in the JSON output on the dataset level, but I do not see any access information on file level. I would like to see if a specific file has restricted access or not.
See also this post on the Google Forum: https://groups.google.com/forum/#!msg/dataverse-community/QZdN4Uql06A/aDlj741NBAAJ
The text was updated successfully, but these errors were encountered: