Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct success message of deaccessioning API endpoint when dataset PID is used #10309

Closed
jggautier opened this issue Feb 8, 2024 · 3 comments · Fixed by #10610
Closed

Correct success message of deaccessioning API endpoint when dataset PID is used #10309

jggautier opened this issue Feb 8, 2024 · 3 comments · Fixed by #10610
Assignees
Labels
Feature: API Size: 10 A percentage of a sprint. 7 hours. Type: Bug a defect User Role: API User Makes use of APIs
Milestone

Comments

@jggautier
Copy link
Contributor

When does this issue occur?
When using the API endpoint for deaccessioning a dataset, documented at https://guides.dataverse.org/en/6.1/api/native-api.html#deaccession-dataset, while passing in a dataset's PID instead of its database ID

What happens?
The success message reads:
{'status': 'OK', 'data': {'message': 'Dataset :persistentId deaccessioned for version 1.0'}}

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

What did you expect to happen?
In place of ":persistentId", the success message would include either the PID of the dataset or its database ID.

Which version of Dataverse are you using?
v6.1

Any related open or closed issues to this bug report?
#778, #8132

@jggautier
Copy link
Contributor Author

The error message does include the dataset's PID, such as:
{'status': 'ERROR', 'message': 'Dataset with Persistent ID doi:10.70122/FK2/PJROQ not found.'}

@sbarbosadataverse sbarbosadataverse added the Size: 10 A percentage of a sprint. 7 hours. label Apr 24, 2024
@jp-tosca jp-tosca self-assigned this May 22, 2024
@jp-tosca
Copy link
Contributor

jp-tosca commented Jun 4, 2024

I tested this with the latest on develop @jggautier but this is what I see:

http://localhost:8080/api/datasets/:Id/versions/:versionID/deaccession

{
    "status": "OK",
    "data": {
        "message": "Dataset 6 deaccessioned for version 1"
    }
}

Update: let me check with the pID

@jp-tosca
Copy link
Contributor

jp-tosca commented Jun 4, 2024

I was able to replicate, I will update tomorrow. Thanks @jggautier

{
    "status": "OK",
    "data": {
        "message": "Dataset :persistentId deaccessioned for version 3"
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: API Size: 10 A percentage of a sprint. 7 hours. Type: Bug a defect User Role: API User Makes use of APIs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants