What system events can I subscribe to for notifications?

Prev Next

You can subscribe to:

  • LUSID system events that occur in the core investment data management platform itself.

  • LUSID system events that occur in ecosystem applications such as Drive, Scheduler and Luminesce.

  • Non-LUSID events that you trigger yourself by calling the TriggerManualEvent API. You could of course attach a webhook to that event to call a LUSID API that then triggers a LUSID system event, and so on.

Note: System events are not the same as instrument events.

To see the list of system events you can subscribe to, either:

  • Sign in to the LUSID web app and navigate to Notifications Management > Subscriptions. Click the Create subscription button and view the Event Type dropdown.

  • Obtain an API access token and call the ListEventTypes API, for example:

    curl -X GET "https://<your-domain>.lusid.com/notification/api/eventtypes"
      -H "Authorization: Bearer <your-API-access-token>"
    Shell

    The response contains a list of system events and their attributes. The following snippet shows the detail of the response for the LUSID PortfolioCreated system event. Note attributes common to all system events are in the headerSchema, while attributes specific to this system event are in the bodySchema:

    {
      "values": [
        {
          "id": "PortfolioCreated",
          "displayName": "Portfolio Created",
          "description": "An event of this type is fired whenever a PortfolioCreated event is created in LUSID",
          "application": "Lusid",
          "headerSchema": [
            { 
              "name": "eventType",
              "type": "String" 
            },
            { 
              "name": "requestId",
              "type": "String" 
            },
            { 
              "name": "userId",
              "type": "String" 
            },
            { 
              "name": "action",
              "type": "String" 
            },
            { 
              "name": "entityType",
              "type": "String" 
            },
            { 
              "name": "timestamp",
              "type": "String" 
            },
            { 
              "name": "href",
              "type": "String" 
            }
          ],
          "bodySchema": [
            { 
              "name": "portfolioScope",
              "type": "String" 
            },
            { 
              "name": "portfolioCode",
              "type": "String" 
            }
          ]
          "href": "https://<your-domain>.lusid.com/notification/api/eventtypes/PortfolioCreated"
        },
        ...
      ],
    }
    JSON

Note the following:

  • You use the id of a system event (in this case, PortfolioCreated) to subscribe to it in the eventType field of a subscription:

    "matchingPattern": {
       "eventType": "PortfolioCreated",
       "filter": "Body.portfolioScope eq 'Finbourne-Examples'"
       }
    
    Plain text
  • You can use attributes of a system event (in this case, Body.portfolioScope and Body.portfolioCode) in condition filters (to subscribe to system events conditionally) and mustache templates (to enrich notification messages).