Skip to content

Commit

Permalink
IQSS#6083 update examples for 'Assign Default Role to User Creating a…
Browse files Browse the repository at this point in the history
… Dataset in a Dataverse' section of Native API.
  • Loading branch information
pkiraly committed Jan 24, 2020
1 parent 84efa89 commit 73a8f9e
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions doc/sphinx-guides/source/api/native-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,19 @@ Assign a default role to a user creating a dataset in a dataverse ``id`` where `
.. code-block:: bash
curl -H X-Dataverse-key:$API_TOKEN -X PUT $SERVER/api/dataverses/$id/defaultContributorRole/$roleAlias
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
export SERVER_URL=https://demo.dataverse.org
export id=root
export roleAlias=curator
curl -H X-Dataverse-key:$API_TOKEN -X PUT $SERVER_URL/api/dataverses/$id/defaultContributorRole/$roleAlias
The fully expanded example above (without environment variables) looks like this:
.. code-block:: bash
curl -H X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx https://demo.dataverse.org/api/dataverses/root/defaultContributorRole/curator
Note: You may use "none" as the ``roleAlias``. This will prevent a user who creates a dataset from having any role on that dataset. It is not recommended for dataverses with human contributors.
.. _assign-role-on-a-dataverse-api:
Expand Down

0 comments on commit 73a8f9e

Please sign in to comment.