Skip to content

Commit 545df8c

Browse files
committed
add docs for "list reviews" API endpoint #12313
1 parent e4c9ddb commit 545df8c

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4752,6 +4752,29 @@ The fully expanded example above (without environment variables) looks like this
47524752
47534753
curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -X PUT "https://demo.dataverse.org/api/datasets/3/license" -H "Content-type:application/json" --upload-file license.json
47544754
4755+
.. _api-list-reviews:
4756+
4757+
List Reviews
4758+
~~~~~~~~~~~~
4759+
4760+
Datasets can have reviews. Specifically, if a :ref:`review dataset <review-datasets-user>` points at (using the ``itemReviewedUrl`` field) the URL form of a persistent ID of a dataset (e.g. https://doi.org/10.5072/FK2/ABCDEF) that is in the same Dataverse installation as the review dataset, the review dataset will be included in the list of reviews for the dataset. It is considered a local review.
4761+
4762+
An API token is optional if the review dataset has been published.
4763+
4764+
.. code-block:: bash
4765+
4766+
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
4767+
export SERVER_URL=https://demo.dataverse.org
4768+
export PERSISTENT_IDENTIFIER=doi:10.5072/FK2/ABCDEF
4769+
4770+
curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/datasets/:persistentId/reviews?persistentId=$PERSISTENT_IDENTIFIER"
4771+
4772+
The fully expanded example above (without environment variables) looks like this:
4773+
4774+
.. code-block:: bash
4775+
4776+
curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" "https://demo.dataverse.org/api/datasets/:persistentId/reviews?persistentId=doi:10.5072/FK2/ABCDEF"
4777+
47554778
Files
47564779
-----
47574780

doc/sphinx-guides/source/user/dataset-management.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,8 @@ Review Datasets can only be created via API. You have the following options:
935935

936936
When creating a review dataset you will likely need to fill in required fields like ``itemReviewedUrl`` as well as fields from one or more "rubric" metadata blocks, as described above under :ref:`review-datasets-overview`.
937937

938+
If you point ``itemReviewedUrl`` at the URL form of a dataset (e.g. https://doi.org/10.5072/FK2/ABCDEF) that is in the same Dataverse installation as the review dataset, the review dataset is considered a local review and can be listed using the :ref:`api-list-reviews` API endpoint.
939+
938940
.. _dataset-types-datacite:
939941

940942
Dataset Types and DataCite

0 commit comments

Comments
 (0)