Views:

Related resources:

Explanation

Tutorials

Reference

To create a feature policy, you must identify API endpoints by their operation ID.

Operation IDs are the values in the left-hand column of the LUSID web app's data policy wizard: 

 

Sometimes there’s an obvious correlation between operation ID and API endpoint, so for example GetInstrument is the operation ID for the https://www.lusid.com/docs/api#operation/GetInstrument endpoint. Sometimes it’s not so obvious. 

To match all LUSID API endpoints to their operation IDs:

  1. Download the Swagger specification for your LUSID domain to a local swagger.json file:
    wget https://<your-domain>.lusid.com/api/swagger/v0/swagger.json
  2. Install the jq command line tool in a suitable Python environment (similar JSON processor tools may be available in other environments):
    pip3 install jq
  3. Run the following command to generate a swagger.csv file listing API endpoints and operation IDs:
    cat swagger.json | jq -r '.paths | keys[] as $k | [ (.[$k] | keys[] as $k1 | [($k | gsub("{"; "\\{") | gsub("}"; "\\}")), $k1, .[$k1].operationId, .[$k1].summary] ) ] | .[] | @csv' > swagger.csv

The CSV file should contain data that can be transformed into a table like this (first few rows shown only). The Feature Name column contains the operation IDs: