Providing you have suitable access control permissions, you can add a multi-value property to any type of entity except transactions. For example, you could add a Portfolio/Manager/Name
property to a portfolio to record the names of all its managers. See how to add single-value properties.
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 add a multi-value property to an entity:
- Using the LUSID REST API
- Using the LUSID web app
- If you have a Luminesce license, by writing a SQL query.
Once added, you can update a property at any time. If you no longer need the property, you can delete it.
Using the LUSID REST API
Each entity type adheres to a specific methodology for adding properties to entities:
- If an entity type has an
Upsert*
API (for example UpsertInstruments), you can add 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 add properties when you create entities. Subsequently, you must use a dedicated property API, for example UpsertPortfolioProperties.
For example, to add a multi-value Portfolio/Manager/Name
property to a transaction portfolio when you create it:
- Obtain an API access token.
- Call the
CreatePortfolio
API for your LUSID domain, passing in your API access token and appending a property to theproperties
collection:key
must be a 3-stage property key in thePortfolio
domain.value
must be alabelValueSet
object consisting of avalues
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.