Relationship between CMDB and Lansweeper
To integrate CIs, configure the Ci with basefield mapping between CMDB and Lansweeper.
JSON Structure
{
"ci": [
{
"reference": "",
"definition": {
"name": {
"type": "",
"key": ""
},
"brand": {
"type": "",
"key": ""
},
"model": {
"type": "",
"key": ""
},
"serial": {
"type": "",
"key": ""
},
"assetTag": {
"type": "",
"key": ""
},
"responsible": {
"type": "",
"key": "",
"SearchBy": [
"Email"
],
"DefaultValue": {
"id": 0
}
}
}
}
]
}
Properties:
| Property | Description | |
|---|---|---|
| Reference | The relationship identifier between JSON blocks. | see |
| Definition | Defines the CI basefield relationship between CMDB and Lansweeper. |
Internal Definition Properties
{
"key": "",
"type": "",
"SearchBy": ["Email"],
"DefaultValue": {
"id": 0
}
}
| Property | Description |
|---|---|
| type | Supported association type: FieldValue, Mapper or Value. |
| Key | Source field in Lansweeper (for example: Name, Manufacturer, Model, SerialNumber, UserName). |
| SearchBy | Only applies to responsible. Supported Value: Email. |
| DefaultValue | Default value when it is not possible to resolve responsible. |
Types of association
| Guy | Description |
|---|---|
| FieldValue | Takes the value directly from the field indicated in Key. |
| Mapper | Converts the source value to a target id/value using a mapping table. |
| Value | Assigns a fixed value defined in settings. |
For a first setup, use this criterion:
- Get started with FieldValue in all fields.
- Use Mapper only when you need to convert source values to CMDB ids.
- Use Value only when all ICs should receive the same value.
Note: For brand and model, the integration queries the CMDB catalog and creates the record when it doesn’t exist.
Recommended example for base CI
{
"ci": [
{
"reference": "lansweeper-default",
"definition": {
"name": {
"type": "FieldValue",
"key": "Name"
},
"brand": {
"type": "FieldValue",
"key": "Manufacturer"
},
"model": {
"type": "FieldValue",
"key": "Model"
},
"serial": {
"type": "FieldValue",
"key": "SerialNumber"
},
"assetTag": {
"type": "FieldValue",
"key": "BarCode"
},
"responsible": {
"type": "FieldValue",
"key": "UserName",
"SearchBy": [
"Email"
],
"DefaultValue": {
"id": 1
}
}
}
}
]
}