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

4406 dataverse move api #4543

Merged
merged 24 commits into from
Apr 24, 2018
Merged

4406 dataverse move api #4543

merged 24 commits into from
Apr 24, 2018

Conversation

ferrys
Copy link
Contributor

@ferrys ferrys commented Mar 26, 2018

This pull request extends the Native API to allow a superuser to move a dataverse.

If a move is forced, the functionality is as follows:

  • If a dataverse's dataset uses a guestbook that was inherited from a parent and is moving to a dataverse without that guestbook, the guestbook is removed from the dataset
  • If a dataverse's default template is one that was inherited from a parent and is moving to a dataverse without that template, the default template is removed
  • If a dataverse is featured in its parent, that feature association is removed
  • If a metadata field is selected on a dataverse and the metadata block does not exist in the destination dataverse, it is disassociated with the moved dataverse
  • If a dataverse or a dataset is linked to the destination dataverse or any of its parents, the link is removed

These rules should also follow for any children of the moved dataverse.

This pull request also adds the ability to remove a dataverse or a dataset link through the API. This endpoint is only available to superusers.

Related Issues

Pull Request Checklist

@coveralls
Copy link

coveralls commented Mar 26, 2018

Coverage Status

Coverage increased (+0.2%) to 13.295% when pulling 9a5cc88 on 4406-dataverse-move-api into b7a2131 on develop.

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use curl syntax. Thanks!


Moves a dataverse whose id is passed to a new dataverse whose id is passed. The dataverse alias also may be used instead of the id. If the moved dataverse has a guestbook, template, metadata block, or featured dataverse that is not compatible with the destination dataverse, you will be informed and given the option to force the move and remove the association. Only accessible to superusers. ::

POST http://$SERVER/api/dataverses/$id/move/$id?key=$apiKey
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please replace this with a full curl command using the syntax is uses such as -X POST?


Moves a dataset whose id is passed to a dataverse whose alias is passed. If the moved dataset has a guestbook that is not compatible with the destination dataverse, you will be informed and given the option to force the move and remove the guestbook. Only accessible to superusers. ::

POST http://$SERVER/api/datasets/$id/move/$alias?key=$apiKey
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above. Please use curl syntax.


::

GET http://$SERVER/api/admin/list-users
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make this a working example with curl syntax.

}
}

.. note:: "List all users" ``GET http://$SERVER/api/admin/authenticatedUsers`` is deprecated, but supported.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's weird that someone marked this as deprecated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not deprecated? Should this line be removed?

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good as of 10fbfc4

@kcondon kcondon merged commit 81f5954 into develop Apr 24, 2018
@kcondon kcondon deleted the 4406-dataverse-move-api branch April 24, 2018 18:20
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 this pull request may close these issues.

4 participants