You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/sphinx-guides/source/api/changelog.rst
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,13 +13,14 @@ v6.9
13
13
- The POST /api/admin/makeDataCount/{id}/updateCitationsForDataset processing is now asynchronous and the response no longer includes the number of citations. The response can be OK if the request is queued or 503 if the queue is full (default queue size is 1000).
14
14
- The way to set per-format size limits for tabular ingest has changed. JSON input is now used. See :ref:`:TabularIngestSizeLimit`.
15
15
- In the past, the settings API would accept any key and value. This is no longer the case because validation has been added. See :ref:`settings_put_single`, for example.
16
+
- For GET /api/notifications/all the JSON response has changed breaking the backward compatibility of the API.
16
17
17
18
v6.8
18
19
----
19
20
20
21
- 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.
21
22
- 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.
22
-
- For GET /api/dataverses/$dataverse-alias/links the Json response has changed breaking the backward compatibility of the API.
23
+
- For GET /api/dataverses/$dataverse-alias/links the JSON response has changed breaking the backward compatibility of the API.
23
24
- For GET /api/admin/dataverse/{dataverse-alias}/storageDriver and /api/datasets/{identifier}/storageDriver the driver name is no longer returned in data.message. This value is now returned in data.name.
24
25
- For PUT /api/dataverses/$dataverse-alias/inputLevels custom input levels that had been previously set will no longer be deleted. To delete input levels send an empty list (deletes all), then send the new/modified list.
25
26
- For GET /api/externalTools and /api/externalTools/{id} the responses are now formatted as JSON (previously the toolParameters and allowedApiCalls were a JSON object and array (respectively) that were serialized as JSON strings) and any configured "requirements" are included.
Copy file name to clipboardExpand all lines: doc/sphinx-guides/source/api/native-api.rst
+47-26Lines changed: 47 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6520,44 +6520,65 @@ The expected OK (200) response looks something like this:
6520
6520
6521
6521
{
6522
6522
"status": "OK",
6523
-
"data": {
6524
-
"notifications": [
6525
-
{
6526
-
"id": 38,
6527
-
"type": "CREATEACC",
6528
-
"displayAsRead": true,
6529
-
"subjectText": "Root: Your account has been created",
6530
-
"messageText": "Hello, \nWelcome to...",
6531
-
"sentTimestamp": "2025-07-21T19:15:37Z"
6532
-
}
6523
+
"totalCount": 15,
6524
+
"data": [
6525
+
{
6526
+
"id": 38,
6527
+
"type": "CREATEACC",
6528
+
"displayAsRead": true,
6529
+
"subjectText": "Root: Your account has been created",
6530
+
"messageText": "Hello, \nWelcome to...",
6531
+
"sentTimestamp": "2025-07-21T19:15:37Z"
6532
+
}
6533
6533
...
6534
6534
6535
-
This endpoint supports an optional query parameter ``inAppNotificationFormat`` which, if sent as ``true``, retrieves the fields needed to build the in-app notifications for the Notifications section of the Dataverse UI, omitting fields related to email notifications.
6535
+
This endpoint supports several optional query parameters to filter and paginate the results.
6536
+
6537
+
The ``inAppNotificationFormat`` parameter, if sent as ``true``, retrieves the fields needed to build the in-app notifications for the Notifications section of the Dataverse UI, omitting fields related to email notifications.
The ``limit`` and ``offset`` parameters can be used for pagination. ``limit`` specifies the maximum number of notifications to return, and ``offset`` specifies the number of notifications to skip from the beginning of the list. For example, to retrieve notifications 11 through 15:
6550
+
6551
+
To aid in pagination the JSON response also includes the total number of rows (totalCount) available.
TypedQuery<UserNotification> query = em.createQuery("select un from UserNotification un where un.user.id =:userId order by un.sendDate desc", UserNotification.class);
46
+
returnfindByUser(userId, false, null, null);
47
+
}
48
+
49
+
/**
50
+
* Finds notifications for a user, with options for pagination and filtering by read status.
51
+
*
52
+
* @param userId The ID of the user.
53
+
* @param onlyUnread If true, returns only unread notifications. If false, returns all.
54
+
* @param limit The maximum number of notifications to return (for pagination). Can be null.
55
+
* @param offset The starting position for the results (for pagination). Can be null.
56
+
* @return A list of UserNotification objects, ordered by send date descending.
TypedQuery<UserNotification> query = em.createQuery("select un from UserNotification un where un.requestor.id =:userId order by un.sendDate desc", UserNotification.class);
0 commit comments