system.kanoa.asset.getAssets
Description
Returns asset information based on the provided parameters.Syntax
getAssets(paramsDict)Parameters:
Returns:
Dictionary
| Parameter | Type | Required | Notes |
|---|---|---|---|
| enabled | bool | ||
| assetPath | str | ||
| assetName | str | ||
| assetPathList | list[string] | ||
| assetTypeName | str | ||
| parentId | int | ||
| assetId | int | ||
| assetIdList | list | ||
| oeeType | str | ||
| oeeTypeList | list | ||
| assetTypeId | int | ||
| assetTypeIdList | list | ||
| assetGroupIdList | list | ||
| assetGroupName | string | ||
| userId | int | ||
| userFunction | str | Can be used to only returns assets based on a user role function |
Code Examples
python
assetData = system.kanoa.asset.getAssets({'assetName': 'Box Line 1'})
assetInfo = system.kanoa.utilities.convertDatasetRowToJSON(assetData, 0)
for k,v in assetInfo.items():
print '%s: %s'%(k,v)
>>>
assetTypeId: 4
assetTypeName: line
targetThreshold: 0.1
oeeType: OEE_Enabled
oee: 0.567
enabled: True
path: Kanoa Box Co\Box Plant\Packaging\Box Line 1
assetId: 4
assetPath: Kanoa Box Co\Box Plant\Packaging\Box Line 1
a: 0.8
assetGroupName: Packaging
tzOffset: None
timeZone: Eastern Standard Time
displayPath: Kanoa Box Co\Box Plant\Packaging\Box Line 1
assetGroupId: 1
parentId: 3
p: 0.8
q: 0.8
tagPath: [Kanoa]/Kanoa Box Co/Box Plant/Packaging/Box Line 1
sortOrder: 10
assetName: Box Line 1
assetGroupColor: None
assetTypePath: enterprise\site\area\line
iconPath: kanoa/line
>>>