Skip to main content

Create an asset from an OPC-UA mapping

POST 

/opc-ua/assets

Creates an asset from the given mapping, links it to the specified OPC-UA object node, and activates and configures the mapped variable nodes. Returns the node id of the created asset.

asset.assetTypeId is optional: an asset type contributes its properties and its icon to the new asset, and nothing else - the signals are built from asset.signals either way, in any number. asset.signals may be left out entirely, which creates the asset and its link alone - the way in for a script that walks the address space and adds the variables afterwards through POST /opc-ua/signals.

Answered with 400 when the mapping itself does not hold together: an asset.id (this creates an asset, it never updates one), no asset.parentNodeId (the node the asset is placed under) or no asset.name, a signal without opcUaNodeId or retrievalMethod, a PULL signal whose retrievalInterval is missing or is not a six-field cron expression of at most 16 characters, or a signal without an output definition. 404 and 409 mean the request is well formed but something it names does not exist or is already taken.

Request​

Responses​

The node id of the newly created asset