Skip to content

Commit 6e29c58

Browse files
committed
various tweaks
1 parent 29c1266 commit 6e29c58

1 file changed

Lines changed: 30 additions & 25 deletions

File tree

doc/sphinx-guides/source/api/native-api.rst

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8852,15 +8852,15 @@ Note that this API is probably only useful for testing.
88528852
MyData
88538853
------
88548854
8855-
The MyData API is used to get a list of just the datasets, dataverses or datafiles an authenticated user can edit.
8855+
The MyData API is used to get a list of just the datasets, collections (dataverses), or datafiles an authenticated user has a role on.
88568856
8857-
The API excludes dataverses linked to an harvesting client. This results in `a known issue <https://github.com/IQSS/dataverse/issues/11083>`_ where regular datasets in harvesting dataverses are missing from the results.
8857+
The API excludes collections linked to an harvesting client. This results in `a known issue <https://github.com/IQSS/dataverse/issues/11083>`_ where regular datasets in harvesting collections are missing from the results.
88588858
8859-
A curl example listing objects
8859+
Here is a curl example.
88608860
88618861
.. code-block:: bash
88628862
8863-
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
8863+
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
88648864
export SERVER_URL=https://demo.dataverse.org
88658865
export ROLE_ID1=6
88668866
export ROLE_ID2=8
@@ -8870,35 +8870,40 @@ export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
88708870
export PUBLISHED_STATE2=Published
88718871
export PER_PAGE=10
88728872
8873-
curl -H "X-Dataverse-key:$API_TOKEN" \
8874-
"$SERVER_URL/api/mydata/retrieve?role_ids=$ROLE_ID1&role_ids=$ROLE_ID2&dvobject_types=$DVTYPE1&dvobject_types=$DVTYPE2&published_states=$PUBLISHED_STATE1&published_states=$PUBLISHED_STATE2&per_page=$PER_PAGE"
8873+
curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/mydata/retrieve?role_ids=$ROLE_ID1&role_ids=$ROLE_ID2&dvobject_types=$DVTYPE1&dvobject_types=$DVTYPE2&published_states=$PUBLISHED_STATE1&published_states=$PUBLISHED_STATE2&per_page=$PER_PAGE"
88758874
88768875
The fully expanded example above (without environment variables) looks like this:
88778876
88788877
.. code-block:: bash
88798878
8880-
curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" https://demo.dataverse.org/api/mydata/retrieve?role_ids=6&role_ids=8&dvobject_types=Dataset&published_states=Unpublished&published_states=Published&per_page=10
8879+
curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" "https://demo.dataverse.org/api/mydata/retrieve?role_ids=6&role_ids=8&dvobject_types=Dataset&published_states=Unpublished&published_states=Published&per_page=10"
88818880
88828881
**Parameters:**
88838882
8884-
* ``role_ids``: Roles are customizable. Multiple "role_ids" parameters can be used to filter by several roles. Standard roles include:
8885-
* ``1`` = Admin
8886-
* ``2`` = File Downloader
8887-
* ``dvobject_types``: Type of object. Multiple "dvobject_types" parameters can be used. Possible values:
8888-
* ``Dataverse``
8889-
* ``Dataset``
8890-
* ``DataFile``
8891-
* ``published_states``: State of the object. Multiple "published_states" parameters can be used. Possible values:
8892-
* ``Published``
8893-
* ``Unpublished``
8894-
* ``Draft``
8895-
* ``Deaccessioned``
8896-
* ``In+Review``
8897-
* ``mydata_search_term``: A string used to search for specific data within the user's MyData collection.
8898-
* ``selected_page``: The page number of results to return (used for pagination).
8899-
* ``per_page``: Number of results returned per page.
8900-
* ``order``: The order in which to sort. Can either be "asc" or "desc".
8901-
* ``fq``: A filter query (Solr syntax) to narrow the list returned. Multiple "fq" parameters can be used.
8883+
- ``role_ids``: Roles are customizable. Multiple "role_ids" parameters can be used to include several roles. Standard roles include:
8884+
- ``1`` = Admin
8885+
- ``2`` = File Downloader
8886+
- ``3`` = Dataverse + Dataset Creator
8887+
- ``4`` = Dataverse Creator
8888+
- ``5`` = Dataset Creator
8889+
- ``6`` = Contributor
8890+
- ``7`` = Curator
8891+
- ``8`` = Member
8892+
- ``dvobject_types``: Type of object. Multiple "dvobject_types" parameters can be used to include several types. Possible values:
8893+
- ``Dataverse``
8894+
- ``Dataset``
8895+
- ``DataFile``
8896+
- ``published_states``: State of the object. Multiple "published_states" parameters can be used to include several states. Possible values:
8897+
- ``Published``
8898+
- ``Unpublished``
8899+
- ``Draft``
8900+
- ``Deaccessioned``
8901+
- ``In+Review`` (the ``+`` represents a space)
8902+
- ``mydata_search_term``: A string used to search for specific data within the user's MyData collection.
8903+
- ``selected_page``: The page number of results to return (used for pagination).
8904+
- ``per_page``: Number of results returned per page.
8905+
- ``order``: The order in which to sort. Can either be "asc" or "desc".
8906+
- ``fq``: A filter query (Solr syntax) to narrow the list returned. Multiple "fq" parameters can be used.
89028907
89038908
MyData Collection List
89048909
~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)