Skip to content

Commit b336267

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into fix-json-ld
2 parents 579fe0c + b3e1c78 commit b336267

36 files changed

Lines changed: 987 additions & 502 deletions
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
### Feature Request: API endpoint for analytics.html
2+
3+
New API to get the analytics.html from settings for SPA (Also can be used to get homePage, header, footer, style, and logo)
4+
5+
See also [the guides](https://dataverse-guide--11359.org.readthedocs.build/en/11359/installation/config.html#web-analytics-code), #11448.

doc/release-notes/11534-link-permissions.md

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The [API for listing the collections a dataverse has been linked to](https://guides.dataverse.org/en/latest/admin/dataverses-datasets.html#list-dataverse-collection-links) (`api/dataverses/$dataverse-alias/links`) has been refactored to return a new Json format. This is a breaking API.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
### Get Dataset File Available Categories API
2+
3+
- This new endpoint allows the user to get all of the available file categories for a dataset, both built-in and custom.
4+

doc/release-notes/11650-unread.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## API Updates
2+
3+
### Support read/unread status for notifications
4+
5+
The API for managing notifications has been extended.
6+
7+
- displayAsRead boolean added to "get all"
8+
- new GET unreadCount API endpoint
9+
- new PUT markAsRead API endpoint
10+
11+
See also [the guides](https://dataverse-guide--11664.org.readthedocs.build/en/11664/api/native-api.html#notifications), #11650, and #11664.

doc/sphinx-guides/source/admin/dataverses-datasets.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Moves a dataset whose id is passed to a Dataverse collection whose alias is pass
118118
Link a Dataset
119119
^^^^^^^^^^^^^^
120120

121-
Creates a link between a dataset and a Dataverse collection (see the :ref:`dataset-linking` section of the User Guide for more information). Accessible to users with Link Dataset permission on the Dataverse collection. ::
121+
Creates a link between a dataset and a Dataverse collection (see the :ref:`dataset-linking` section of the User Guide for more information). ::
122122

123123
curl -H "X-Dataverse-key: $API_TOKEN" -X PUT http://$SERVER/api/datasets/$linked-dataset-id/link/$linking-dataverse-alias
124124

@@ -155,7 +155,7 @@ It returns a list in the following format (new format as of v6.4):
155155
Unlink a Dataset
156156
^^^^^^^^^^^^^^^^
157157

158-
Removes a link between a dataset and a Dataverse collection. Accessible to users with Link Dataset permission on the Dataverse collection. ::
158+
Removes a link between a dataset and a Dataverse collection. Accessible to users with Publish Dataset permissions. ::
159159

160160
curl -H "X-Dataverse-key: $API_TOKEN" -X DELETE http://$SERVER/api/datasets/$linked-dataset-id/deleteLink/$linking-dataverse-alias
161161

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ This API changelog is experimental and we would love feedback on its usefulness.
99

1010
v6.8
1111
----
12+
1213
- For POST /api/files/{id}/metadata passing an empty string ("description":"") or array ("categories":[]) will no longer be ignored. Empty fields will now clear out the values in the file's metadata. To ignore the fields simply do not include them in the JSON string.
1314
- For PUT /api/datasets/{id}/editMetadata the query parameter "sourceInternalVersionNumber" has been removed and replaced with "sourceLastUpdateTime" to verify that the data being edited hasn't been modified and isn't stale.
15+
- For GET /api/dataverses/$dataverse-alias/links the Json response has changed breaking the backward compatibility of the API.
1416

1517
v6.7
1618
----

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

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3592,6 +3592,21 @@ See :ref:`:CustomDatasetSummaryFields` in the Installation Guide for how the lis
35923592
35933593
curl "$SERVER_URL/api/datasets/summaryFieldNames"
35943594
3595+
.. _get-available-dataset-file-categories:
3596+
3597+
Get Available Dataset File Categories
3598+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3599+
3600+
This api returns a list of Categories that may be applied to the files of a given dataset.
3601+
3602+
.. code-block:: bash
3603+
3604+
export SERVER_URL=https://demo.dataverse.org
3605+
export PERSISTENT_IDENTIFIER=doi:10.5072/FK2/YD5QDG
3606+
3607+
curl "$SERVER_URL/api/datasets/:persistentId/availableFileCategories?persistentId=$PERSISTENT_IDENTIFIER"
3608+
3609+
35953610
.. _guestbook-at-request-api:
35963611

35973612
Configure When a Dataset Guestbook Appears (If Enabled)
@@ -5821,6 +5836,34 @@ The fully expanded example above (without environment variables) looks like this
58215836
58225837
curl "https://demo.dataverse.org/api/info/exportFormats"
58235838
5839+
Get Customization File Contents
5840+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5841+
5842+
The Customization API is used to retrieve the analytics-code.html as well as other customization file contents.
5843+
5844+
See also :ref:`web-analytics-code` in the Configuration section of the Installation Guide and :ref:`Branding Your Installation`
5845+
5846+
The Content-Type returned in the header is based on the media type of the file being returned (example: analytics-code.html returns "text/html; charset=UTF-8"
5847+
5848+
Valid types are "homePage", "header", "footer", "style", "analytics", and "logo".
5849+
5850+
A curl example getting the analytics-code
5851+
5852+
.. code-block:: bash
5853+
5854+
export SERVER_URL=https://demo.dataverse.org
5855+
export TYPE=analytics
5856+
5857+
curl -X GET "$SERVER_URL/api/info/settings/customization/$TYPE"
5858+
5859+
The fully expanded example above (without environment variables) looks like this:
5860+
5861+
.. code-block:: bash
5862+
5863+
curl -X GET "https://demo.dataverse.org/api/info/settings/customization/analytics"
5864+
5865+
.. _customization-analytics:
5866+
58245867
.. _metadata-blocks-api:
58255868
58265869
Metadata Blocks
@@ -5932,6 +5975,8 @@ Notifications
59325975
59335976
See :ref:`account-notifications` in the User Guide for an overview. For a list of all the notification types mentioned below (e.g. ASSIGNROLE), see :ref:`mute-notifications` in the Admin Guide.
59345977
5978+
.. _get-all-notifications:
5979+
59355980
Get All Notifications by User
59365981
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59375982
@@ -5941,6 +5986,52 @@ Each user can get a dump of their notifications by passing in their API token:
59415986
59425987
curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/notifications/all"
59435988
5989+
The expected OK (200) response looks something like this:
5990+
5991+
.. code-block:: text
5992+
5993+
{
5994+
"status": "OK",
5995+
"data": {
5996+
"notifications": [
5997+
{
5998+
"id": 38,
5999+
"type": "CREATEACC",
6000+
"displayAsRead": true,
6001+
"subjectText": "Root: Your account has been created",
6002+
"messageText": "Hello, \nWelcome to...",
6003+
"sentTimestamp": "2025-07-21T19:15:37Z"
6004+
}
6005+
...
6006+
6007+
Get Unread Count
6008+
~~~~~~~~~~~~~~~~
6009+
6010+
You can get a count of your unread notifications as shown below.
6011+
6012+
.. code-block:: bash
6013+
6014+
curl -H "X-Dataverse-key:$API_TOKEN" -X GET "$SERVER_URL/api/notifications/unreadCount"
6015+
6016+
Mark Notification As Read
6017+
~~~~~~~~~~~~~~~~~~~~~~~~~
6018+
6019+
After finding the ID of a notification using :ref:`get-all-notifications`, you can pass it to the "markAsRead" API endpoint as shown below. Note that this endpoint is idempotent; you can mark an already-read notification as read over and over.
6020+
6021+
.. code-block:: bash
6022+
6023+
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
6024+
export SERVER_URL=https://demo.dataverse.org
6025+
export NOTIFICATION_ID=555
6026+
6027+
curl -H "X-Dataverse-key:$API_TOKEN" -X PUT "$SERVER_URL/api/notifications/$NOTIFICATION_ID/markAsRead"
6028+
6029+
The fully expanded example above (without environment variables) looks like this:
6030+
6031+
.. code-block:: bash
6032+
6033+
curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -X PUT "https://demo.dataverse.org/api/notifications/555/markAsRead"
6034+
59446035
Delete Notification by User
59456036
~~~~~~~~~~~~~~~~~~~~~~~~~~~
59466037

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ Dataset linking allows a Dataverse collection owner to "link" their Dataverse co
215215

216216
For example, researchers working on a collaborative study across institutions can each link their own individual institutional Dataverse collections to the one collaborative dataset, making it easier for interested parties from each institution to find the study.
217217

218-
In order to link a dataset, you will need your account to have the "Link Dataset" permission on the Dataverse collection that is doing the linking. If you created the Dataverse collection then you should have this permission already, but if not then you will need to ask the admin of that Dataverse collection to assign that permission to your account. You do not need any special permissions on the dataset being linked.
218+
In order to link a dataset, you will need your account to have the "Publish Dataset" permission on the Dataverse collection that is doing the linking. If you created the Dataverse collection then you should have this permission already, but if not then you will need to ask the admin of that Dataverse collection to assign that permission to your account. You do not need any special permissions on the dataset being linked.
219219

220220
To link a dataset to your Dataverse collection, you must navigate to that dataset and click the white "Link" button in the upper-right corner of the dataset page. This will open up a window where you can type in the name of the Dataverse collection that you would like to link the dataset to. Select your Dataverse collection and click the save button. This will establish the link, and the dataset will now appear under your Dataverse collection.
221221

scripts/api/data/role-curator.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
{
22
"alias":"curator",
33
"name":"Curator",
4-
"description":"For datasets, a person who can edit License + Terms, edit Permissions, and publish and link datasets.",
4+
"description":"For datasets, a person who can edit License + Terms, edit Permissions, and publish datasets.",
55
"permissions":[
66
"ViewUnpublishedDataset",
77
"EditDataset",
88
"DownloadFile",
99
"DeleteDatasetDraft",
1010
"PublishDataset",
11-
"LinkDataset",
1211
"ManageDatasetPermissions",
1312
"ManageFilePermissions",
1413
"AddDataverse",

0 commit comments

Comments
 (0)