As we make changes in the source code and issue new releases, you may need to update to the latest version of the Notification Service. This page shows you what updates are included and how to migrate to the newest version.
In version 2:
The Notification Service moves to
https://<your-domain>.lusid.com/notification/api/
. Users need to update their code to reflect this change.Users can now subscribe to an expanded set of events, including order creation events, allocation events and more. See how to list all events.
TransactionPortfolioCreated
has been replaced byPortfolioCreated
using a different schema. Users need to update their code to reflect this change.
Users can now send an AWS Simple Queue Service (SQS) notification when an event occurs. Read more on this.
Some APIs have changed and/or been renamed. Users need to update their code to reflect the following changes:
TriggerManualEvent has replaced the
CreateEvent
API. See how to use the updated Manual event.Notifications
APIs, includingCreateEmailNotification
,CreateSmsNotification
,CreateWebhookNotification
,UpdateEmailNotification
,UpdateSmsNotification
andUpdateWebhookNotification
have been consolidated into CreateNotification and UpdateNotfication. Users now need to specify the notification type within the body of the call:Event attributes have been updated to include a
headerSchema
andbodySchema
. Users need to update their code to prefix these attributes withHeader.
orBody.
when using them in mustache templates and LUSID filtering syntax.For example, you can update mustache templates in your notifications by calling the UpdateNotification API and passing in the subscription
scope
andcode
, the notificationid
and the request body for the type of notification you're updating. An updated email notification for the portfolio created event might look like this:curl -X 'PUT' \ 'https://<your-domain>.lusid.com/notification/api/subscriptions/PortfolioCreated/PortfolioCreatedEvent/notifications/EmailNotification' \ -H 'accept: application/json' \ -H 'Content-Type: application/json-patch+json' \ -H 'Authorization: Bearer <your-bearer-token>' \ -d '{ "displayName": "PortfolioCreatedEventEmailNotification", "description": "An email notification for portfolio created events", "notificationType": { "Type": "Email", "Subject": "Portfolio with scope {{Body.PortfolioScope}} and code {{Body.PortfolioCode}} created", "PlainTextBody": "Portfolio with scope {{Body.PortfolioScope}} and code {{Body.PortfolioCode}} created at {{Header.timestamp}}", "HtmlBody": "<p>Portfolio with scope {{Body.PortfolioScope}} and code {{Body.PortfolioCode}} created at {{Header.timestamp}}</p>", "EmailAddressTo": [ "joe.bloggs@acme.com" ] } }'
Users can now interact with version 2 of the Notification Service in Luminesce using the following providers:
Please note:
Notification.Subscription
,Notification.EventType
andNotification.Delivery
return both version 1 and 2 data.The version 1 Luminesce providers
Notification.Event.Writer
andNotification.Subscription.Notification
are now deprecated but, for now, can still be used to interact with version 1 of the Notification Service. We advise users migrate to version 2 as soon as they can.