Request ‒ Devices/createVirtualDevice
Property | Type | Description | Mandatory |
---|
productId | String | The unique identifier of the Product to which this Device belongs. This ID is returned in response to the Products/Post request. | Y |
name | String | The name of this Device. | Y |
serialNumber | String | The serial number of this Device. | |
events | String | Copy in here the actual XML text. See Defining a Virtual Device Manifest for more details. | |
Example JSON Devices/createVirtualDevice
curl -X POST \
https://api.stg.axonize.com/odata/devices/createVirtualDevice \
-H ‘Cache-Control: no-cache’ \
-H ‘Content-Type: application/json’ \
-H ‘Authorization: Token’ \
-H ‘appId: be517433-c4b8-4748-9258-1b1234567890’ \
-d ‘{“virtualDevice”:{“productId”:”58766044391802681471830f”,
”name”:”shachartest”,”serialNumber”:”123231″,”events”:”<Events>\n\t<Event>\n\t\t<Id>7</Id>\n\t\t
<Name>Temperature</Name>\n\t\t<MinValue>10</MinValue>\n\t\t<MaxValue>30</MaxValue>\n\t\t
<SecondsInterval>300</SecondsInterval>\n\t\t<ValueType>Decimal</ValueType>\n\t\t
<DecimalPoints>2</DecimalPoints>\n\t</Event>\n</Events>”}}’