Skip to content

Update Notifications API to support AccountPage: Notifications #11673

@ekraffmiller

Description

@ekraffmiller

The current version of the API returns translated messages that are used in email notifications. We need to update the API (either by adding new properties or creating a new endpoint) that will support the SPA Account:Notifications UI, and other client apps.

To support the SPA, the API would return a key to the message, which will be used to translate in the client side. Also needed are dynamic properties to embed in the translated message.

For example, if a user has been granted a role in a collection, the API response would be:

{
  "id": "1",
  "messageKey": "assignedCollectionRole",
  "properties": [
    {
      "key": "role",
      "value": "Admin"
    },
    {
      "key": "collectionName",
      "value": "Scientific Research"
    },
    {
      "key": "collectionId",
      "value": "1234"
    }
  ],
  "displayAsRead": true,
  "sentTimestamp": "2025-07-17T13:27:33Z"
}

And then in the SPA, the translation file would be:
"notifications.assignedCollectionRole"="You have been granted the role of {{role}} in <1>{{collectionName}}</1>."

It would be the responsibility of the client app to use the id to generate the url.

This is keeping the key value pairs generic, to avoid having to defining class types for the different types of notifications, and make it easier to add new messages.

This is just a proposal, open to different ideas on how to implement this.

Metadata

Metadata

Assignees

Labels

FY26 Sprint 2FY26 Sprint 2 (2025-07-16 - 2025-07-30)FY26 Sprint 3(2025-07-30 - 2025-08-13)GREI Re-archIssues related to the GREI Dataverse rearchitectureOriginal size: 30SPA.Q3.2025.6Account: NotificationsSize: 30A percentage of a sprint. 21 hours. (formerly size:33)

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions