From f2e5784771504bbbb36799a1a76365b6b227857e Mon Sep 17 00:00:00 2001 From: "Kenneth D. Mankoff" Date: Wed, 14 Apr 2021 04:27:21 -0700 Subject: [PATCH 1/4] dirindex doc should show use of DOI for end users --- doc/sphinx-guides/source/api/native-api.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst index 9f422f83c72..c85342b9b7f 100644 --- a/doc/sphinx-guides/source/api/native-api.rst +++ b/doc/sphinx-guides/source/api/native-api.rst @@ -796,6 +796,9 @@ View Dataset Files and Folders as a Directory Index .. code-block:: bash curl $SERVER_URL/api/datasets/$ID/dirindex/ + # or + curl ${SERVER_URL}/api/datasets/:persistentId/dirindex/?persistentId=doi:${PERSISTENT_ID} + Optional parameters: @@ -868,6 +871,8 @@ An example of a ``wget`` command line for crawling ("recursive downloading") of .. code-block:: bash wget -r -e robots=off -nH --cut-dirs=3 --content-disposition https://demo.dataverse.org/api/datasets/24/dirindex/ + # or + wget -r -e robots=off -nH --cut-dirs=3 --content-disposition https://demo.dataverse.org/api/datasets/:persistentId/dirindex/?persistentId=doi:${PERSISTEN_DOI} .. note:: In addition to the files and folders in the dataset, the command line above will also save the directory index of each folder, in a separate folder "dirindex". From 469b96b674616743ca1b2f8af814e6663337af37 Mon Sep 17 00:00:00 2001 From: Ken Mankoff Date: Wed, 14 Apr 2021 09:34:40 -0700 Subject: [PATCH 2/4] Update doc/sphinx-guides/source/api/native-api.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/api/native-api.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst index c85342b9b7f..7a4e2401374 100644 --- a/doc/sphinx-guides/source/api/native-api.rst +++ b/doc/sphinx-guides/source/api/native-api.rst @@ -797,7 +797,7 @@ View Dataset Files and Folders as a Directory Index curl $SERVER_URL/api/datasets/$ID/dirindex/ # or - curl ${SERVER_URL}/api/datasets/:persistentId/dirindex/?persistentId=doi:${PERSISTENT_ID} + curl ${SERVER_URL}/api/datasets/:persistentId/dirindex?persistentId=doi:${PERSISTENT_ID} Optional parameters: @@ -3493,4 +3493,3 @@ Recursively applies the role assignments of the specified Dataverse collection, Note: setting ``:InheritParentRoleAssignments`` will automatically trigger inheritance of the parent Dataverse collection's role assignments for a newly created Dataverse collection. Hence this API call is intended as a way to update existing child Dataverse collections or to update children after a change in role assignments has been made on a parent Dataverse collection. - From c0071a57e7f9a318cf56cd9ac1784a39fd84c823 Mon Sep 17 00:00:00 2001 From: Ken Mankoff Date: Wed, 14 Apr 2021 09:34:50 -0700 Subject: [PATCH 3/4] Update doc/sphinx-guides/source/api/native-api.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/api/native-api.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst index 7a4e2401374..7137a8d7c58 100644 --- a/doc/sphinx-guides/source/api/native-api.rst +++ b/doc/sphinx-guides/source/api/native-api.rst @@ -872,7 +872,7 @@ An example of a ``wget`` command line for crawling ("recursive downloading") of wget -r -e robots=off -nH --cut-dirs=3 --content-disposition https://demo.dataverse.org/api/datasets/24/dirindex/ # or - wget -r -e robots=off -nH --cut-dirs=3 --content-disposition https://demo.dataverse.org/api/datasets/:persistentId/dirindex/?persistentId=doi:${PERSISTEN_DOI} + wget -r -e robots=off -nH --cut-dirs=3 --content-disposition https://demo.dataverse.org/api/datasets/:persistentId/dirindex?persistentId=doi:${PERSISTENT_ID} .. note:: In addition to the files and folders in the dataset, the command line above will also save the directory index of each folder, in a separate folder "dirindex". @@ -3492,4 +3492,3 @@ Recursively applies the role assignments of the specified Dataverse collection, GET http://$SERVER/api/admin/dataverse/{dataverse alias}/addRoleAssignmentsToChildren Note: setting ``:InheritParentRoleAssignments`` will automatically trigger inheritance of the parent Dataverse collection's role assignments for a newly created Dataverse collection. Hence this API call is intended as a way to update existing child Dataverse collections or to update children after a change in role assignments has been made on a parent Dataverse collection. - From 1914e7673127f7d0353ecad7039c644639658fe6 Mon Sep 17 00:00:00 2001 From: Ken Mankoff Date: Thu, 22 Apr 2021 11:26:37 -0700 Subject: [PATCH 4/4] Use variables rather than hard-coded dataset ${ID} is data set ID. ${PERSISTENT_ID} is DOI --- doc/sphinx-guides/source/api/native-api.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst index 7137a8d7c58..8b902771eba 100644 --- a/doc/sphinx-guides/source/api/native-api.rst +++ b/doc/sphinx-guides/source/api/native-api.rst @@ -795,7 +795,7 @@ View Dataset Files and Folders as a Directory Index .. code-block:: bash - curl $SERVER_URL/api/datasets/$ID/dirindex/ + curl $SERVER_URL/api/datasets/${ID}/dirindex/ # or curl ${SERVER_URL}/api/datasets/:persistentId/dirindex?persistentId=doi:${PERSISTENT_ID} @@ -870,7 +870,7 @@ An example of a ``wget`` command line for crawling ("recursive downloading") of .. code-block:: bash - wget -r -e robots=off -nH --cut-dirs=3 --content-disposition https://demo.dataverse.org/api/datasets/24/dirindex/ + wget -r -e robots=off -nH --cut-dirs=3 --content-disposition https://demo.dataverse.org/api/datasets/${ID}/dirindex/ # or wget -r -e robots=off -nH --cut-dirs=3 --content-disposition https://demo.dataverse.org/api/datasets/:persistentId/dirindex?persistentId=doi:${PERSISTENT_ID}