Skip to content

Asset Import

Paritech.Authority.Control Asset Import <Service>

Defines multiple Assets by importing from a file or STDIN.

FieldDescription
ServiceThe Authority Service to connect to.
OptionDescription
-Cols <Columns>A comma-separated list of column names. Defaults to type,code.
-Enc <Encoding>Input encoding. One of ASCII, UTF8 (default).
-File <FileName>Read from the given file
-Format <Format>Input data format. One of CSV (default), TSV, JSON.
-HeaderThe input CSV data does contain a header line. With -Cols, specify to skip the header.
-NoHeaderThe input CSV data does not contain a header line.
-StdinRead from STDIN. Default.

When using the CSV format, Type and Code determine the Asset. Subsequent columns provide context information based on the column header. Empty values are ignored.

  • X:<AppCode>:<Key>: Adds a Metadata value to the AppCode application.
  • X:<AppCode>:<IdName>:<Key>: Adds an ID value to the IdName set under the AppCode application.

When using the JSON format, each line is interpreted as a JSON serialised Asset.

The process result will be 0 on success, and a negative value on failure.

Assets.csv
Type,Code,X:Zenith:Visibilities:Full,X:Zenith:Visibilities:Limited
TradingAccount,XS:0001,,
TradingAccount,XS:0002,,
TradingAccount,XS:0003,,
TradingAccount,XS:0004,,
Market,XSX,"All&Full","Asset&Symbol,SymbolExtended,State,Pricing,Aggregates,Quantities,DepthTotals,Auction"
Bulk Import Associations
Paritech.Authority.Control Asset Import XOSP User 1234 < Assets.csv

Utilises the /asset API.