You can use LUSID's filtering syntax to subscribe to an event conditionally; that is, to only trigger notifications when those conditions are met.
You can filter on any of the attributes of an event. For example, when you call the ListEventTypes API to examine the PortfolioCreated
event, you see it has seven common string attributes in the headerSchema
and two specific string attributes in the bodySchema
:
You apply your filter in the filter
field when you create a subscription to that event.
Note you must prefix attributes appropriately with either Header.
or Body.
. For example, you could subscribe to the PortfolioCreated
event only when a portfolio is created in a particular scope, and by a particular user:
Applying the above filter using the LUSID web app might look as follows: