Skip to content

Conversation

GPortas
Copy link
Contributor

@GPortas GPortas commented Sep 30, 2025

What this PR does / why we need it:

Review #11851 first.

The user notifications endpoint has been enhanced with new optional query parameters to allow for more specific and
efficient data retrieval.

1. Filter by Unread Status

You can now fetch only unread notifications by using the onlyUnread boolean parameter.

  • onlyUnread: (Optional, boolean) When set to true, the API will only return notifications that the user has not
    yet marked as read.

Example:

curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/notifications/all?onlyUnread=true"

2. Pagination Support

Pagination is now supported through the limit and offset parameters, allowing you to retrieve notifications in smaller,
manageable chunks.

  • limit: (Optional, integer) Specifies the maximum number of notifications to return.

  • offset: (Optional, integer) Specifies the number of notifications to skip before starting to return results.

Example (Retrieve notifications 11 through 20):

curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/notifications/all?limit=10&offset=10"

Which issue(s) this PR closes:

Suggestions on how to test this:

Described above

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

None

Is there a release notes update needed for this change?:

Yes, attached

@GPortas GPortas changed the base branch from develop to 11804-notifs-api-ext September 30, 2025 10:11

This comment has been minimized.

This comment has been minimized.

@GPortas GPortas changed the title Notifications API pagination and more Implements pagination and unread-only filter options to notifications/all endpoint #11852 Sep 30, 2025
@GPortas GPortas added SPA These changes are required for the Dataverse SPA GREI Re-arch Issues related to the GREI Dataverse rearchitecture SPA.Q3.2025.6 Account: Notifications Size: 3 A percentage of a sprint. 2.1 hours. Original size: 3 labels Sep 30, 2025
@GPortas GPortas marked this pull request as ready for review September 30, 2025 11:10
@GPortas GPortas moved this to Ready for Review ⏩ in IQSS Dataverse Project Sep 30, 2025
@GPortas GPortas changed the title Implements pagination and unread-only filter options to notifications/all endpoint #11852 Implements pagination and unread-only filter options to notifications/all endpoint Sep 30, 2025

This comment has been minimized.

1 similar comment

This comment has been minimized.

This comment has been minimized.

@coveralls
Copy link

coveralls commented Oct 8, 2025

Coverage Status

coverage: 23.558% (+0.008%) from 23.55%
when pulling 80446e7 on 11852-notifs-api-pagination-unread
into 8bb9161 on 11804-notifs-api-ext.

Copy link

github-actions bot commented Oct 8, 2025

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:11852-notifs-api-pagination-unread
ghcr.io/gdcc/configbaker:11852-notifs-api-pagination-unread

🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name.

@cmbz cmbz added the FY26 Sprint 8 FY26 Sprint 8 (2025-10-08 - 2025-10-22) label Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 8 FY26 Sprint 8 (2025-10-08 - 2025-10-22) GREI Re-arch Issues related to the GREI Dataverse rearchitecture Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q3.2025.6 Account: Notifications SPA These changes are required for the Dataverse SPA

Projects

Status: Ready for Review ⏩

Development

Successfully merging this pull request may close these issues.

4 participants