Creates a new device in the domain of the owner identified by the apikey. This service is called either by an admin application or by the device to create itself in the platform.
Path: cs-ws/resources/admin/device Method: POST
Parameters
Data
<device> <name>...</name> <model>..</model> <config> optional device configuration parameters <name>...</name> <value>...</value> </config> ... <sensor> optional if sensor configuration parameters are set <name>...</name> <config> <name>...</name> <value>...</value> </config> ... </sensor> ... <actor> optional if actor configuration parameters are set <name>...</name> <config> <name>...</name> <value>...</value> </config> ... </actor> ... </device>
Errors:
Example
POST http://localhost/cs-ws/resources/admin/device?apikey=1234 HTTP/1.1 <device> <name>MyTempDev</name> <model>MyTemperatureDeviceModel</model> <actor> <name>position</name> <config> <name>max</name> <value>100</value> </config> </actor> <config> <name>maxpos</name> <value>1000</value> </config> </device> HTTP/1.1 200 OK