Response ‒ Devices/createVirtualDevice
All the same properties in the request are returned in the response. In addition, the response that is returned also contains the following properties –
Property
Type
Description
deviceId
String
A unique identifier that is automatically generated for this Device by IoT Platform .
appId
String
The Application to which this Device belongs.
This generated by IoT Platform and sent in the response to Applications/Post.
createDate, createUser, updateDate, updateUser
See Common Response Properties.
Example JSON Devices/createVirtualDevice
{
“@odata.context” : “https://stg-axonizeapi-axonize.stgse-axonize.p.azurewebsites.net/odata/$metadata#Device/$entity”,
“productId” : “587660443918026814711234”,
“productName” : null,
“serialNumber” : “123231”,
“topic” : null,
“groupId” : null,
“active” : false,
“firstTimeRegistrationDate” : “0001-01-01T00:00:00Z”,
“activationDate” : “0001-01-01T00:00:00Z”,
“token” : null,
“commandsProtocol” : “Undefined”,
“lastReadingTime” : “0001-01-01T00:00:00Z”,
“isConnected” : false,
“hubId” : null,
“hubPrimaryKey” : “cH1pQfeZeM”,
“hubSecondaryKey” : “aIE/hXY”,
“customId” : null,
“keepAliveThreshold” : 0,
“isAlarmed” : false,
“virtualDeviceStatus” : “Started”,
“virtualDeviceEvents” : “<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>”,
“redisKey” : null,
“diagram” : null,
“streamUrl” : null,
“parentId” : null,
“name” : “shachartest”,
“id” : “5bc5d1bb19ec0c40b07f1234”,
“appId” : “f51df5bf-8d3c-4ba5-9574-3f3b8d6a26bd”,
“createDate” : “2018-10-16T11:55:39.1418009Z”,
“createUser” : “58845d47922dcf2b0cc41234”,
“updateDate” : “0001-01-01T00:00:00Z”,
“updateUser” : null,
“lastReadings” : [],
“additionalProperties” : [],
“userDefinedLocation” : null,
“currentLocation” : null,
“coords” : null,
“settings” : [],
“ancestors” : []
}