IQSS / IQSS/dataverse

API Endpoints: Update Metadata For a Dataset / Edit Dataset Metadata

Open
#9,348 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature: API Help Wanted: Documentation Mentor: pdurbin Type: Bug User Role: API User
Dominant language
Java
Stars
1.1k
Forks
564
Avg merge
2d 2h
Merged PRs (30d)
29

Description

What steps does it take to reproduce the issue?
It needs a published dataset.
The 2 endpoints for updating the metadata fail:
/api/datasets/:persistentId/versions/:latest?persistentId=$PERSISTENT_IDENTIFIER results in a
400, {"status":"ERROR","message":"Only the :draft version can be updated"}

/api/datasets/:persistentId/editMetadata/?persistentId=$PERSISTENT_IDENTIFIER
OR
api/datasets/:persistentId/editMetadata/?persistentId=doi:10.5072/FK2/BCCP9Z&replace=true
result in responses with status code 500.

  • When does this issue occur?
    All the time, for published datasets, but it the endpoint for drafts works

  • Which page(s) does it occurs on?
    demo.dataverse.org

  • What happens?

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

  • What did you expect to happen?
    A 200, with updated metadata

Which version of Dataverse are you using?
v. 5.12.1 build 1122-cf90431

Any related open or closed issues to this bug report?

Screenshots:

No matter the issue, screenshots are always welcome.

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two metadata-update requests against a published dataset on demo.dataverse.org, comparing them with the working draft endpoint. Trace the API entry points for /api/datasets/:persistentId/versions/:latest and /editMetadata, then add coverage for published datasets; done means both requests return 200 with updated metadata.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.