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

Add API for simple Dataset Edits #3599

Closed
scolapasta opened this issue Jan 26, 2017 · 7 comments
Closed

Add API for simple Dataset Edits #3599

scolapasta opened this issue Jan 26, 2017 · 7 comments
Assignees
Labels
Feature: API Type: Feature a feature request User Role: API User Makes use of APIs

Comments

@scolapasta
Copy link
Contributor

scolapasta commented Jan 26, 2017

If a user wants to make a minor edit to a dataset, right now they need to get the entire JSON for the dataset, make the change there and then call update. It would be nice to have an API that allow a user to just specify what they are modifying or adding.

In particular this will be useful when we want to add.change subjects based on the new values we will be incorporating soon.*

  • note this issue is for the general edit functionality; if we deem it simpler to create an API to just handle subjects we may do that first
@pdurbin
Copy link
Member

pdurbin commented Jan 26, 2017

This issue reminds me a lot of #3060 and #3068 (and #2110 a bit).

@sekmiller
Copy link
Contributor

The endpoint for delete metadata is Datasets/{id}/deleteMetadata

Something like this will work:

curl -H "X-Dataverse-key: ac512a48-a9eb-4b8c-a9bd-351da6f89efb" -X PUT http://localhost:8080/api/datasets/:persistentId/deleteMetadata/?persistentId=doi:10.5072/FK2/7WMAAJ --upload-file /Users/skraffmi/NetBeansProjects/dataverse/doc/sphinx-guides/source/_static/api/dataset-delete-subject-metadata.json

(with the appropriate server, file and id edits)

@kcondon
Copy link
Contributor

kcondon commented Jun 22, 2018

Generally works but needs to honor the all or nothing transaction rule in the case of delete, not delete what you can.

@kcondon
Copy link
Contributor

kcondon commented Jun 28, 2018

Passes all tests, did notice a stack trace when tried to submit a blank subject. Should it catch that instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: API Type: Feature a feature request User Role: API User Makes use of APIs
Projects
None yet
Development

No branches or pull requests

7 participants