Can I get Info on file level access restrictions through the API?

21 views
Skip to first unread message

Laura Huisintveld

unread,
May 2, 2018, 9:52:35 AM5/2/18
to Dataverse Users Community
Hello all,

I have a question about the Dataverse API. Is it possible to retrieve with the API information about access restrictions on file level?
I do see the Terms of Use and the Licence information in the JSON output, but I do not see any access information on file level.

This dataset for example has one restricted, and one unrestricted file: https://dataverse.nl/api/datasets/:persistentId/?persistentId=hdl:10411/IW15PI

I can't see if a file is restricted if I look up the metadata through the API, but maybe there is another API call I can use?


Thanks!

Laura

Philip Durbin

unread,
May 2, 2018, 11:52:39 AM5/2/18
to dataverse...@googlegroups.com
I don't believe we have an API for all of this but we definitely should. Can you please open an issue at https://github.com/IQSS/dataverse/issues ? Thanks!

If you want to get a "true" or "false" back for if a file is restricted, you could try something like this:

curl -s 'https://dataverse.harvard.edu/api/datasets/:persistentId?persistentId=doi:10.7910/DVN/TJCLKP' | jq '.data.latestVersion.files[0].restricted'

But that's just the "restricted" boolean... nothing about Terms of Use.

I hope this helps,

Phil



--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.
To post to this group, send email to dataverse-community@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/feb3f42a-f7c1-4d6b-ae7f-52e624e06353%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Laura Huisintveld

unread,
May 3, 2018, 4:41:10 AM5/3/18
to Dataverse Users Community
Thanks for your reply Phil.

I have created an issue: https://github.com/IQSS/dataverse/issues/4645


Op woensdag 2 mei 2018 17:52:39 UTC+2 schreef Philip Durbin:
I don't believe we have an API for all of this but we definitely should. Can you please open an issue at https://github.com/IQSS/dataverse/issues ? Thanks!

If you want to get a "true" or "false" back for if a file is restricted, you could try something like this:

curl -s 'https://dataverse.harvard.edu/api/datasets/:persistentId?persistentId=doi:10.7910/DVN/TJCLKP' | jq '.data.latestVersion.files[0].restricted'

But that's just the "restricted" boolean... nothing about Terms of Use.

I hope this helps,

Phil


On Wed, May 2, 2018 at 9:52 AM, Laura Huisintveld <laura.hu...@dans.knaw.nl> wrote:
Hello all,

I have a question about the Dataverse API. Is it possible to retrieve with the API information about access restrictions on file level?
I do see the Terms of Use and the Licence information in the JSON output, but I do not see any access information on file level.

This dataset for example has one restricted, and one unrestricted file: https://dataverse.nl/api/datasets/:persistentId/?persistentId=hdl:10411/IW15PI

I can't see if a file is restricted if I look up the metadata through the API, but maybe there is another API call I can use?


Thanks!

Laura

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.
To post to this group, send email to dataverse...@googlegroups.com.

Philip Durbin

unread,
May 3, 2018, 7:53:54 AM5/3/18
to dataverse...@googlegroups.com
Thanks! I left you a long reply with screenshots and "curl" examples in the issue you opened. I was confused about Terms of Use. Like you said, it is possible to retrieve them via API.

On Thu, May 3, 2018 at 4:41 AM, Laura Huisintveld <laura.hu...@dans.knaw.nl> wrote:
Thanks for your reply Phil.

I have created an issue: https://github.com/IQSS/dataverse/issues/4645


Op woensdag 2 mei 2018 17:52:39 UTC+2 schreef Philip Durbin:
I don't believe we have an API for all of this but we definitely should. Can you please open an issue at https://github.com/IQSS/dataverse/issues ? Thanks!

If you want to get a "true" or "false" back for if a file is restricted, you could try something like this:

curl -s 'https://dataverse.harvard.edu/api/datasets/:persistentId?persistentId=doi:10.7910/DVN/TJCLKP' | jq '.data.latestVersion.files[0].restricted'

But that's just the "restricted" boolean... nothing about Terms of Use.

I hope this helps,

Phil


On Wed, May 2, 2018 at 9:52 AM, Laura Huisintveld <laura.hu...@dans.knaw.nl> wrote:
Hello all,

I have a question about the Dataverse API. Is it possible to retrieve with the API information about access restrictions on file level?
I do see the Terms of Use and the Licence information in the JSON output, but I do not see any access information on file level.

This dataset for example has one restricted, and one unrestricted file: https://dataverse.nl/api/datasets/:persistentId/?persistentId=hdl:10411/IW15PI

I can't see if a file is restricted if I look up the metadata through the API, but maybe there is another API call I can use?


Thanks!

Laura

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsubscribe...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages