You can change the configuration settings for individual devices using the REST API. This capability is most useful for fine-tuning location IDs, as these can only be set in OT-BASE Asset Discovery, not in Asset Center.
In order to use this capability you must reference the network that the device is in using its network GUID that you can obtain using the GET command.
Devices can be referenced by either
- their IP address
- their host name
- their MAC address
The following parameters can be changed:
Note that all parameters other than location ID are better set in OT-BASE Asset Center.
Setting parameters for one device only
If you intend to change only one device in a network, the simplest way to do so is to use a URL that is composed from the following components:
- Initial part with protocol, IP address or hostname of the Asset Discovery node, plus the port number used by the REST API (if using a port other than 443). Example: https://192.168.0.20:44462
- the network GUID, preceded by the selector for the networks endpoint. Example: /networks/AB233237-986B-4A6E-99AC-9B5D21AF4817
- the device reference (IP address, MAC address or host name), preceded by the selector for the devices endpoint. Example: /devices/192.168.10.7
- name of the parameter that you want to change. Example: locationId.
A full URL will then look like this:
You can then pass the new value of the location identifier as the body of the PUT call, using JSON format.
Setting parameters for multiple devices in a network
For setting parameters for multiple devices in a network, the following syntax is more convenient and allows you to do multiple settings in a single API call.
Instead of referencing a single device in your URL, you only reference the devices endpoint in your PUT call. Example:
The device references and parameter settings are now all done in the body of the PUT call, like this:
"hwVendor": "My vendor who no longer is in business",
"hwModel": "My obsolete hardware model name"
"hwDescription": "My obsolete device",