Stream: community

Topic: Retrieve Files Embargo status for API


view this post on Zulip Julien C (Sep 19 2023 at 12:00):

Hello Dataverse community,

Is there a way from Native API version 5.10 to retrieve the embargo possible status of a file in a dataset and its "dateAvailable" field please ?

I'm planning to migrate some datasets in an automatic manner, but I don't know how to do that.

The "api/files/{ID}/metadata" endpoint gives only the "restricted" status of a file which is not what I'm looking for.

Thanks in advance for your reply,
Best regards

view this post on Zulip Philip Durbin ๐Ÿš€ (Sep 19 2023 at 12:05):

Hmm, I see "set" and "remove" starting here: https://guides.dataverse.org/en/5.10/api/native-api.html#set-an-embargo-on-files-in-a-dataset

view this post on Zulip Philip Durbin ๐Ÿš€ (Sep 19 2023 at 12:05):

You're interested in "get"?

view this post on Zulip Julien C (Sep 19 2023 at 12:06):

Yes indeed

view this post on Zulip Philip Durbin ๐Ÿš€ (Sep 19 2023 at 12:08):

Can you please create an issue for this?

view this post on Zulip Julien C (Sep 19 2023 at 12:10):

Hello Philip,
I'm just new around here, can you tell me where I can "create" this "issue" please ?
Thx in advance

view this post on Zulip Oliver Bertuch (Sep 19 2023 at 12:11):

Hi and welcome to the community! :heart: :wave: Here's a link to open an issue: https://github.com/IQSS/dataverse/issues/new/choose

view this post on Zulip Julien C (Sep 19 2023 at 12:21):

OK thanks I will do that, is there a way to work around in the meantime or an API endpoint maybe still not documented for this particular "GET" request ?

view this post on Zulip Philip Durbin ๐Ÿš€ (Sep 19 2023 at 12:27):

I don't see a workaround. Just those two methods in the datasets API.

view this post on Zulip Philip Durbin ๐Ÿš€ (Sep 19 2023 at 15:29):

https://dataverse.harvard.edu/file.xhtml?fileId=6294750 is embargoed. If you curl https://dataverse.harvard.edu/api/files/6294750 you can find this:

"embargo": {
  "dateAvailable": "2026-05-06",
  "reason": "These data are still being used for publication. However, they can be made available upon reasonable request to the corresponding author (tedonzongluc@gmail.com)."
},

view this post on Zulip Philip Durbin ๐Ÿš€ (Sep 19 2023 at 15:31):

@Juan Lรณpez does that help?

view this post on Zulip Julien C (Sep 21 2023 at 06:40):

Thanks Juan, it helps.
That's what I'm looking for.
On our test server. It says that endpoint doesn't exist. It might have been desactivated. Or not possible to version 5.10.
I have to dig deeper to understand.

view this post on Zulip Philip Durbin ๐Ÿš€ (Sep 21 2023 at 10:32):

Whoops! I meant to @mention you, @Julien C , not Juan. Glad it helps!

view this post on Zulip Philip Durbin ๐Ÿš€ (Sep 21 2023 at 10:40):

And yes, it's interesting. Endpoint doesn't exist at https://dorel.univ-lorraine.fr/api/files/41249 but it does exist at https://dorel.univ-lorraine.fr/api/files/41249/metadata

view this post on Zulip Philip Durbin ๐Ÿš€ (Sep 21 2023 at 10:40):

Docs on the latter endpoint: https://guides.dataverse.org/en/5.10/api/native-api.html#getting-file-metadata


Last updated: Nov 01 2025 at 14:11 UTC