system.kanoa.asset.updateAsset
Description
Updates an asset (kanoaOPS).Syntax
updateAsset(assetInfo, userId)- assetInfo (dict) - Dictionary containing asset information to be updated.
- dictionary i.e {'assetName': 'Packaging', 'parentId': 538, 'assetTypeId': 2, 'assetGroupId': 4, 'oee': 0.6, 'a': 0.8, 'p': 0.7, 'q': 0.9, 'targetThreshold': 0.1, 'oeeType': 'OEE_Enabled', 'sortOrder': None, 'enabled': True, 'assetId': 540}
- userId (int) - User ID.
- records modified (int).
Code Examples
# Example Usage:
asset_info = {
'assetName': 'UpdatedAsset',
'parentId': 123,
'assetTypeId': 456,
'assetGroupId': 789,
'oee': 0.85,
'a': 0.7,
'p': 0.9,
'q': 0.95,
'targetThreshold': 0.8,
'oeeType': 'OEE_Enabled',
'sortOrder': 10,
'enabled': True,
'assetId': 1234
}
user_id = 456
records_modified = system.kanoa.asset.updateAsset(asset_info, user_id)