Skip to content

Unable to update DDI Codebook XML file of an ingested tabular file via Dataverse API #12877

Open

Description

@marangiop

What steps does it take to reproduce the issue?

Step 1. Ingest .sav file that contains categorical variables encoded as numbers (e.g. "DEVICE" variable with "1" for "Mobile", "2" for "Laptop"
Step 2. Download metadata file locally
curl -L -H "X-Dataverse-key:$API_KEY" -o ddi_original_harvard.xml "https://demo.dataverse.org/api/access/datafile/:persistentId/metadata/ddi?persistentId=doi:XX.XXXXX/##X/######/######"
Step 3. Identify file id
curl -s -H "X-Dataverse-key:$API_KEY" "https://demo.dataverse.org/api/files/:persistentId?persistentId=doi:XX.XXXXX/##X/######/######" | jq .
Step 4. Make local copy of ddi_original_harvard.xml and update it as needed
Step 5. Attempt to replace the metadata file
curl -v -H "X-Dataverse-key:$API_KEY" -X PUT "https://demo.dataverse.org/api/edit/XXXXX" --upload-file ddi_corrected_harvard.xml

  • When does this issue occur?
    When trying to update the DDI codebook metadata file of an ingested tabular file

  • Which page(s) does it occurs on?
    N/A

  • What happens?
    It returns
    {"status":"OK","data":{"message":"Nothing to update"}}.
    DDI codebook metadata file does not get updated

  • To whom does it occur (all users, curators, superusers)?
    all users

  • What did you expect to happen?
    The DDI codebook metadata file would get updated

Which version of Dataverse are you using?
6.10.1 build master-300d5b5
I have also reproduced the error in demo.dataverse.org, which uses v. 6.12.1 build master-bddc062

Any related open or closed issues to this bug report?
N/A but see #troubleshooting > Unable to update DDI Codebook XML file via API @ 💬

Screenshots:
N/A (see file attached)

No matter the issue, screenshots are always welcome.

To add a screenshot, please use one of the following formats and/or methods described here:

dataverse_harvard_api_error.txt

Are you thinking about creating a pull request for this issue?
Help is always welcome, is this bug something you or your organization plan to fix?
N/A

Activity

  1. pdurbin commented on Nov 9, 2026

    @pdurbin
    Member

    @marangiop sent me the files privately and I uploaded the to a directory that the core team can access: https://drive.google.com/drive/folders/1UMmIrPTA5uC_5EQ0xcgt8qx5GJf2qb_1?usp=drive_link

    @lubitchv you're welcome to access these as well, if you like, since you added the feature originally in this PR:

    For anyone who picks this up, please note that there is more discussion at #troubleshooting > Unable to update DDI Codebook XML file via API @ 💬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: Bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions