Views:

Related resources:

Explanation

Tutorials

Reference

Providing you have suitable access control permissions, you can attach a multi-value property to any type of entity except transactions. For example, you could attach a Portfolio/Manager/Name property to a portfolio to record the names of all its managers. See how to attach single-value properties.

Note: If you are the LUSID domain owner, you are automatically assigned the built-in lusid-administrator role, which has all the permissions necessary to perform the operations in this article.

A multi-value property is one whose property type has a constraintStyle of Collection and a data type of string. The lifeTime can be either TimeVariant or Perpetual.

Note the following:

  • A multi-value property can have up to 250 individual values.
  • Each value must be unique. Any duplications are stored as the same value.
  • All values must conform to the data type specified by the property type (that is, a string).
  • The maximum number of characters per value is 1024.
  • Values are not ordered, so when you retrieve a multi-value property LUSID returns them in an arbitrary order.
  • Only values with 128 characters or less are returned if you retrieve a multi-value property using a filter, to keep the system performant.
  • A time-variant multi-value property can have a different set of values during different time periods. You should specify an effective from 'start date' for the whole set; it is effective until the start date of the next set of values. Note that for some entity types you can retrieve time-variant property values as a time-series, which might be more intuitive.

There are several ways to attach a multi-value property to an entity:

Using the LUSID REST API

Each entity type adheres to a specific methodology for attaching properties to entities:

  • If an entity type has an Upsert* API (for example UpsertInstruments), you can attach properties when you create or update entities (that is, at any time). There may be a dedicated property API that you can use independently if you want, for example UpsertInstrumentProperties.
  • If an entity type has a Create* API (for example CreatePortfolio), you can attach properties when you create entities. Subsequently, you must use a dedicated property API, for example UpsertPortfolioProperties.

For example, to attach a multi-value Portfolio/Manager/Name property to a transaction portfolio when you create it:

  1. Obtain an API access token.
  2. Call the CreatePortfolio API for your LUSID domain, passing in your API access token and appending a property to the properties collection:
    • key must be a 3-stage property key in the Portfolio domain.
    • value must be a labelValueSet object consisting of a values array containing a comma-separated list of string values.
    • effectiveFrom is nominally optional but for a time-variant property sets the 'start date' for this set of values; it must a valid date:
    curl -X POST "https://<your-domain>.lusid.com/api/api/transactionportfolios/examplescope"
    -H "Authorization: Bearer <your-API-access-token>"
    -H "Content-Type: application/json"
    -d '{
      "displayName": "Portfolio UK",
      "code": "PortfolioUK",
      "baseCurrency": "GBP",
      "properties": {
        "Portfolio/Manager/Name": {
          "key": "Portfolio/Manager/Name",
          "value": {
            "labelValueSet": {
              "values": [
                "Joe Bloggs",            
                "Jane Doe",
                "Matt Smith"
              ]
            }
          },
          "effectiveFrom": "2022-06-18T09:00:00.0000000+00:00" 
        }
      }
    }'

Using the LUSID web app

Coming soon.