# system.kanoa.asset.addAsset(assetInfo, userId)

Add a new asset. All assetInfo keys are required

---
### Parameters
**assetInfo** `Dictionary`<br />
<table class='dictionaryKeyTable'>
	<tbody>
 	<tr><td> - assetGroupId</td><td>Integer</td><td>Id of asset group. Can be None</td></tr>	
 	<tr><td> - assetName</td><td>String</td><td>Name of asset</td></tr>	
 	<tr><td> - assetTypeId</td><td>Integer</td><td>Id of asset type. Required</td></tr>	
 	<tr><td> - enabled</td><td>Boolean</td><td></td></tr>	
 	<tr><td> - oeeEnabled</td><td>Boolean</td><td>Set to True if state and count data will be collected for this asset</td></tr>	
 	<tr><td> - parentId</td><td>Integer</td><td>Id of parent asset. Can be None</td></tr>	
 	<tr><td> - processTypeId</td><td>Integer</td><td>Id of process type i.e. whether this asset is a discrete, continuous or batch process. Can be None</td></tr>	
 	<tr><td> - sortOrder</td><td>Integer</td><td></td></tr>	
 	<tr><td> - timeZone</td><td>String</td><td>i.e 'Pacific Standard Time'. Only needed at the site level</td></tr>	
	</tbody>
</table>

**userId** `Integer`:Id of the user executing the function<br />

---
### Returns
**assetId** `Integer`<br />
**message** `String` None if success<br />

---
### Example
```python
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
assetTypeId = system.kanoa.utilities.getFieldValue('assetTypeId', system.kanoa.asset.getAssetTypes({'assetTypeName': 'enterprise'}))
assetInfo = {
    'assetName': 'New Enterprise',
    'parentId': None,
    'assetTypeId': 1,
    'assetGroupId': None,
    'oeeEnabled': False,
    'processTypeId': None,
    'sortOrder': 1,
    'enabled': True,
    'timeZone': None
}
assetId, msg = system.kanoa.asset.addAsset(assetInfo, userId)
print assetId, msg
>>> 2076, None
```
