ID for a dataset or file

47 views
Skip to first unread message

Tutasi

unread,
Sep 13, 2022, 3:49:50 AM9/13/22
to Dataverse Users Community
Hi , what is the curl command to get the ID for a dataset or file? also for harvested dataset. Thank you

Philip Durbin

unread,
Sep 14, 2022, 10:49:27 AM9/14/22
to dataverse...@googlegroups.com
I'll use a harvested dataset in the examples below but a non-harvested dataset would be the same.

## id of the first file
$ curl -s 'https://dataverse.harvard.edu/api/datasets/export?exporter=dataverse_json&persistentId=doi:10.18738/T8/7DYVPF' | jq '.datasetVersion.files[0].dataFile.id'
6380770

I hope this helps!

Phil


On Tue, Sep 13, 2022 at 3:49 AM Tutasi <jtu...@gmail.com> wrote:
Hi , what is the curl command to get the ID for a dataset or file? also for harvested dataset. Thank you

--
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-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/33b292bd-a403-4a86-9e35-0cd2e6153269n%40googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages