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

Creating Datasets via API Should Use Default License - if None Specified #9364

Closed
shlake opened this issue Feb 3, 2023 · 4 comments
Closed
Milestone

Comments

@shlake
Copy link
Contributor

shlake commented Feb 3, 2023

What steps does it take to reproduce the issue?
Use the example dataset-finch1.json from the documentation: https://guides.dataverse.org/en/latest/api/native-api.html#create-a-dataset-in-a-dataverse-collection
https://guides.dataverse.org/en/latest/_downloads/fc56af1c414df69fd4721ce3629f0c03/dataset-finch1.json

Use the API to create a dataset.
curl -H "X-Dataverse-key:xxxxxxxx-xEJEJEJEJEE" -X POST "https://demo.dataverse.org/api/dataverses/root/datasets" --upload-file "dataset-finch1.json" -H 'Content-type:application/json'

  • What happens?
    The dataset is created, but without the default license - assumes "Custom License" see screenshot below.

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

  • What did you expect to happen?
    Since the json file did not have any license specified, I expected the CC-0 license (default) to be automatically added to the dataset.

Which version of Dataverse are you using?
5.12.1 (on demo.dataverse.org)

Any related open or closed issues to this bug report?

Screenshots:

Here is what the dataset shows after create via API:
Screen Shot 2023-02-03 at 9 11 17 AM

@qqmyers
Copy link
Member

qqmyers commented Feb 3, 2023

FWIW: We should consider whether this would be the right behavior when Custom Terms are allowed or only when Dataverse is configured to require one of the preset licenses. If we do it in the former case, is there a way then to import something with custom terms? Would that lead to a case where uploading json with no license and then calling the json-ld endpoint to set terms would fail because the default license had automatically been accepted?

@shlake
Copy link
Contributor Author

shlake commented Feb 3, 2023

Easy?? solution:

  • Add the default license line in the example file?
  • Add text in the documentation that says "license" info is needed in the json, whether it is to keep the default (community norm), or make a custom one?

Thanks, @qqmyers
Adding the license to the json file worked: "license": "CC0 1.0",
https://demo.dataverse.org/dataset.xhtml?persistentId=doi:10.70122/FK2/HUUQPF

@landreev
Copy link
Contributor

Hello,
As part of working on #9148, I have added the CC0 license to the sample json files that we recommend in the Guide as a model, as follows:

"license": {
   "name": "CC0 1.0",
   "uri": "http://creativecommons.org/publicdomain/zero/1.0"
}

and I also fixed the bug in #9155, so the format above will now be importable.
But, for the sake of backward compatibility, this form will still be accepted as well:

"license" : "CC0 1.0"

In the same branch I'm also fixing the misleading information in the guide that could result in the configured license being dropped when a dataset is updated via API. There will be a release note.

this is a PR #9568.

@pdurbin pdurbin added this to the 5.14 milestone May 9, 2023
@pdurbin
Copy link
Member

pdurbin commented May 9, 2023

Closing manually because this PR was merged even though it says closed:

@pdurbin pdurbin closed this as completed May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants