Unpublish Dataset: Create an API endpoint to unpublish a dataset
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
We need an API endpoint to unpublish datasets in some cases where a user may mistakenly publish their dataset in root when it needs to be reviewed first in by a journal dataverse.
Here are the essential steps by hand that hopefully will become the endpoint:
Tables involved:
Dataset
Datasetlock
Datasetversion
Dvobject
To Unpublish a Dataset:
- Lock dataset
insert into datasetlock (reason, starttime, dataset_id, user_id) values ('InReview', now(), 3092, 7); - (N/A) Reset DOIs to reserved, both dataset and files
log on to ezid console, manage dois, set dois from public to unavailable
Not really needed: would resolve to need perms link and works again once published. - Change datasetversion table: releasetime, versionstate, versionnumber, minorversionnumber
update datasetversion set versionstate='DRAFT', releasetime=NULL, versionnumber=NULL, minorversionnumber=NULL where dataset_id=3092 and id=98; - Change dvobject table for dataset: publicationdate, globalidcreatetime
- (N/A) Change dvobject table for datafiles: same as for dataset
update dvobject set publicationdate=NULL, globalidcreatetime=NULL where id in (3093, 3094, 3095);
Not really needed, no functional impact and ezid has original create time stored. - Change dataset table: lastexporttime
update dataset set lastexporttime=NULL where id=3092;
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the API represents Dataset, Datasetlock, Datasetversion, and Dvobject, then compare the listed manual unpublication steps with existing publication behavior. The endpoint is done when it safely locks the dataset and applies the required state, release-time, publication-date, identifier, and export-time changes for an unpublish operation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100