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: no asset.nodeId (the parent 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
- 200
- 400
- 401
- 403
- 404
- 409
- default
The node id of the newly created asset
the default error response
Unauthorized — the bearer token is missing, expired or invalid, or carries no role. Errors raised by the security aspects contain an ErrorDto body; requests rejected by the security filter chain may have an empty body.
Forbidden — the authenticated user lacks the required role or access rights.
No such OPC-UA object node, no such parent node, no such asset type, or a signal names a variable node that does not exist.
The OPC-UA object node is already linked to an asset.
the default error response