Response events Schema
AVRO schema Response event
{
"type" : "record",
"name" : "Response",
"fields" : [ {
"name" : "groupName",
"type" : [ "null", "string" ],
"default" : null
}, {
"name" : "serialNumber",
"type" : [ "null", "string" ],
"default" : null
}, {
"name" : "serverTime",
"type" : [ "null", "long" ],
"default" : null
}, {
"name" : "requestId",
"type" : [ "null", "string" ],
"default" : null
}, {
"name" : "resourcePath",
"type" : [ "null", "string" ],
"default" : null
}, {
"name" : "value",
"type" : [ "null", "string" ],
"default" : null
}, {
"name" : "operationType",
"type" : [ "null", "string" ],
"default" : null
}, {
"name" : "resultCode",
"type" : [ "null", "long" ],
"default" : null
}, {
"name" : "resultSubCode",
"type" : [ "null", "string" ],
"default" : null
}, {
"name" : "resultReason",
"type" : [ "null", "string" ],
"default" : null
} ],
"connect.version" : 1,
"connect.name" : "Response"
}
The following table provides the descriptions of the Response events schema fields.
| Field name | Description | Field Type |
|---|---|---|
groupName |
Specifies the group to which the device pertains to. | string |
serialNumber |
Specifies the unique endpoint ID of the device. | string |
serverTime |
Specifies the processing time (number of milliseconds since 1970). | long |
requestId |
The request ID pertaining to the resource request. | string |
resourcePath |
Specifies the path of the resource response. | string |
value |
Specifies the payload of the resource (base64-encoded in case of binary content). | string |
operationType |
Specifies the operation for which the response was obtained (read, write, exec, delete). | string |
resultCode |
Code representing the result of the resource request. | long |
resultSubCode |
Sub code representing the result of the resource request. | string |
resultReason |
Details the reason for the resource request failure. | string |
Example of response events showing MQTT
{"groupName":"XP1.XP2.XP3.XP4","serialNumber":"mqtt1","serverTime":1597831010363,"requestId":"968703ad-971a-476f-9f28-5db797c1c17c","resourcePath":"/device/0/battery","value":"82.0","operationType":"read","resultCode":0,"resultSubCode":null,"resultReason":"Success"}
{"groupName":"XP1.XP2.XP3.XP4","serialNumber":"mqtt1","serverTime":1597831252452,"requestId":"968703ad-971a-476f-9f28-5db797c1c17d","resourcePath":"/device/0/battery","value":null,"operationType":"write","resultCode":0,"resultSubCode":null,"resultReason":"Success"}
{"groupName":"XP1.XP2.XP3.XP4","serialNumber":"mqtt1","serverTime":1597831343789,"requestId":"968703ad-971a-476f-9f28-5db797c1c17d","resourcePath":"/device/0/battery","value":null,"operationType":"write","resultCode":0,"resultSubCode":null,"resultReason":"Success"}
{"groupName":"XP1.XP2.XP3.XP4","serialNumber":"mqtt1","serverTime":1597831427532,"requestId":"968703ad-971a-476f-9f28-5db797c1c17d","resourcePath":"/device/0/battery","value":"99.0","operationType":"read","resultCode":0,"resultSubCode":null,"resultReason":"Success"}
Example of response events showing LMM2M
{"groupName":"XP1.XP2.XP3.XP4","serialNumber":"lwm2m1","serverTime":1597832678908,"requestId":"968703ad-971a-536f-9a28-5db797c1c17c","resourcePath":"3/0/9","value":"82","operationType":"read","resultCode":0,"resultSubCode":null,"resultReason":"Success"}
{"groupName":"XP1.XP2.XP3.XP4","serialNumber":"lwm2m1","serverTime":1597832697654,"requestId":"968703ad-971a-536f-9a28-5db797c1c17d","resourcePath":"3/0/9","value":null,"operationType":"write","resultCode":0,"resultSubCode":null,"resultReason":"Success"}
{"groupName":"XP1.XP2.XP3.XP4","serialNumber":"lwm2m1","serverTime":1597832709757,"requestId":"968703ad-971a-536f-9a28-5db797c1c17d","resourcePath":"3/0/9","value":null,"operationType":"exec","resultCode":0,"resultSubCode":null,"resultReason":"Success"}
{"groupName":"XP1.XP2.XP3.XP4","serialNumber":"lwm2m1","serverTime":1597832715468,"requestId":"968703ad-971a-536f-9a28-5db797c1c17d","resourcePath":"3/0/9","value":null,"operationType":"delete","resultCode":0,"resultSubCode":null,"resultReason":"Success"}