Skip to content

Commit

Permalink
IQSS#6083 update examples for 'Create a New Role in a Dataverse' sect…
Browse files Browse the repository at this point in the history
…ion of Native API.
  • Loading branch information
pkiraly committed Jan 24, 2020
1 parent 494fd59 commit 2dd16ec
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions doc/sphinx-guides/source/api/native-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,19 @@ Creates a new role under dataverse ``id``. Needs a json file with the role descr
.. code-block:: bash
curl -H X-Dataverse-key:$API_TOKEN -X POST $SERVER/api/dataverses/$id/roles
POSTed JSON example::
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
export SERVER_URL=https://demo.dataverse.org
export id=root
curl -H X-Dataverse-key:$API_TOKEN -X POST $SERVER/api/dataverses/$id/roles --upload-file roles.json
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/roles --upload-file roles.json
Where ``roles.json`` looks like this::
{
"alias": "sys1",
Expand Down

0 comments on commit 2dd16ec

Please sign in to comment.