Skip to content

API file download issues #7413

Description

@chrowe

I am trying to download https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/OTTBDX# via the API and not having any luck.

I am following the docs at https://guides.dataverse.org/en/latest/api/dataaccess.html

I generated my API token at https://dataverse.harvard.edu/dataverseuser.xhtml?selectTab=apiTokenTab

export API_TOKEN=[my api token]
export SERVER_URL=https://dataverse.harvard.edu
export PERSISTENT_ID=doi:10.7910/DVN/OTTBDX

curl -O -J -H "X-Dataverse-key:$API_TOKEN" $SERVER_URL/api/access/dataset/:persistentId/?persistentId=$PERSISTENT_ID

I have also tried with https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/HXZOCG

I just get an empty file named HXZOCG

Running on Ubuntu 16.04.6 LTS

Any ideas why this would not work?

If I just paste the API url into Chrome on my laptop it works fine.

Thanks,
Chris

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions