How do I override a LUSID system setting?

System settings for LUSID are stored in the Configuration Store. See a list of system settings.

You can override the default values for all the users in your LUSID domain.

Note that system settings in the Configuration Store have certain unique permissions that it is not possible to manage using roles and policies in the usual way:

  • No users can create, update, or delete shared system configuration sets (that is, it is not possible to create a system setting).

  • No users can create or delete shared system configuration items (but it is possible to override their values).

  • All users can read personal and shared system configuration sets and items.

Using the Configuration Store REST API

Retrieving the system setting you want to override

System settings are stored with a particular code in the reserved system scope in the Shared area of the Configuration Store.

To retrieve all those available to override, obtain an API access token and call the ListConfigurationSets API, passing in your API access token and specifying a type of Shared, for example:

curl -X GET "https://<your-domain>.lusid.com/configuration/api/sets?type=Shared"
   -H "Authorization: Bearer <your-API-access-token>"

The following example response contains two configuration sets. The first is a standard secret or parameter uploaded to the Configuration Store in the normal way. The second with a code of TransactionBooking in the reserved system scope is a system setting:

{
  "values": [
    {
      "id": {
        "scope": "external-services",
        "code": "slack"
      },
      "type": "shared"
    },
    {
      "id": {
        "scope": "system",
        "code": "TransactionBooking"
      },
      "type": "shared"
    }
  ],
...
}

Retrieving the default values of the system setting

To retrieve a system setting and the default value(s) available to override, call the GetSystemConfigurationSets API, passing in your API access token and specifying a valid system setting code (retrieved above).

For example, to retrieve the TransactionBooking system setting:

curl -X GET "https://<your-domain>.lusid.com/configuration/api/sets/system/TransactionBooking"
   -H "Authorization: Bearer <your-API-access-token>"

The response for TransactionBooking is as follows:

{
  "values": [
    {
      "createdAt": "2022-03-17T04:26:25.0081490+00:00",
      "createdBy": "00ua1fgxciBfVFWqb2p7",
      "lastModifiedAt": "2022-03-18T04:26:29.2146820+00:00",
      "lastModifiedBy": "00ua1fgxciBfVFWqb2p7",
      "description": "System configurations that alter the behaviour of LUSID during transaction booking.",
      "items": [
        {
          "key": "TradeToPortfolioRateRecipe",
          "value": "recipescope/recipecode",
          "valueType": "text",
          "isSecret": false,
          "ref": "config://shared/system/TransactionBooking/TradeToPortfolioRateRecipe",
          "blockReveal": false
        },
        {
          "key": "SetTradeToPortfolioRate",
          "value": "False",
          "valueType": "boolean",
          "isSecret": false,
          "ref": "config://shared/system/TransactionBooking/SetTradeToPortfolioRate",
          "blockReveal": false
        }
      ],
      "id": {
        "scope": "system",
        "code": "TransactionBooking"
      },
      "type": "shared"
    }
  ],
...
}

Note the following:

  • The configuration set representing TransactionBooking has two configuration items, each representing an individual setting that can be overridden.

  • The first configuration item setting has a key of TradeToPortfolioRateRecipe and a default value of recipescope/recipecode.

  • The second configuration item setting has a key of SetTradeToPortfolioRate and a default value of False.

Overriding default values for all users

To override a value for all the users in your LUSID domain, call the UpdateConfigurationItem API, passing in your API access token and specifying:

  • A type of Shared

  • The system scope

  • The code of the system setting

  • The key of the item in that system setting.

For example, to change SetTradeToPortfolioRate to True and cause LUSID to automatically use the TradeToPortfolioRateRecipe recipe to determine how to look up FX rates loaded into the LUSID quote store:

curl -X PUT "https://<your-domain>.lusid.com/configuration/api/sets/Shared/system/TransactionBooking/items/SetTradeToPortfolioRate"
   -H "Authorization: Bearer <your-API-access-token>"
   -H "Content-Type: application/json-patch+json"
   -d "{ value: True }"

The response confirms the modified value:

{
  "createdAt": "2022-03-17T04:26:27.0259160+00:00",
  "createdBy": "00ua1fgxciBfVFWqb2p7",
  "lastModifiedAt": "2022-04-04T14:20:19.7525925+00:00",
  "lastModifiedBy": "00u91lo2d7X42sdse2p7",
  "description": "This controls the defaulting of the TradeToPortfolioRate on a transaction. If set to True, LUSID will attempt to resolve a TradeToPortfolioRate using CurrencyPair quotes. Quotes are determined by the recipe set in TradeToPortfolioRateRecipe config item.",
  "key": "SetTradeToPortfolioRate",
  "value": "True",
  "valueType": "boolean",
  "isSecret": false,
  "ref": "config://shared/system/TransactionBooking/SetTradeToPortfolioRate",
  "blockReveal": false
}

Using the LUSID web app

  1. Sign in to the LUSID web app using the credentials of a LUSID administrator.

  2. From the top left menu, select System Settings > Configuration Store:
     

  3. Navigate to the Shared keys tab and enter System in the Scope column to only show configuration sets containing system settings:
     

  4. Click the Edit pencil icon to change the individual settings in a configuration set:

  5. Click the Save button.