IoT Platform forwards and subscribes to data based on topic formats. Custom topic formats are user-defined. Basic communication and TSL topic formats are converted during message forwarding. This topic documents each converted format.
Message forwarding and device communication topics
Communication topic definitions and classifications are covered in What is a topic?.
Specify the raw data format during device development:
-
Basic communication and TSL topic data must comply with the Alink protocol, as described in the related documents in the Alink protocol directory.
After forwarding, the data format is converted. Each converted format is described below.
-
You define the data format for custom topics.
After forwarding, custom topic data remains unchanged.
The following table maps forwarding topics to their corresponding device communication topics.
Table 1. Topic descriptions
Topic | Description | References |
Custom | A topic for forwarding messages in a custom data format follows the same format as a custom topic: ${TopicShortName} specifies a custom topic category, which is the suffix of the custom topic. The value can contain wildcard characters, including plus signs (+) and number signs (#).
| |
Device Status Change Notification | The topic that is used to forward notifications when the status of a device changes between online and offline. Format: /as/mqtt/status/${productKey}/${deviceName}. | |
TSL Data Reporting | Includes:
| |
The following topics are used to submit raw device data:
| ||
Device Changes Throughout Lifecycle | The topic that is used to forward messages when a device is created, deleted, disabled, or enabled. Format: | |
Sub-Device Data Report Detected by Gateway | The topic | |
Device Topological Relation Changes | The topic that is used to forward notifications when topological relationships between sub-devices and the gateway are created or deleted. This topic is specific to gateways. Format: /${productKey}/${deviceName}/thing/topo/lifecycle. | |
A device uses the topic | ||
Device tag change | The topic for forwarding device tag updates is | |
A device uses the following topic to report raw data: | ||
TSL Historical Data Reporting | Includes:
| |
| How to report historical data for a Thing Specification Language model | |
Device Status Notification for OTA Updates | Includes:
| |
A device reports its upgrade progress to the following topic: | ||
Submit a module version number | The topic for reporting an updated Over-the-Air (OTA) module version: | |
A device uses the following topic to report its OTA module version: | ||
Batch status notification | IoT Platform publishes status change notifications for an OTA update batch to the following topic: | |
Job Event | Includes the following topics:
|
Device online and offline status
Topic: /as/mqtt/status/${productKey}/${deviceName}
Reports a device's online or offline status.
Online format:
{
"status":"online",
"iotId":"4z819VQHk6VSLmmBJfrf00107e****",
"productKey":"al12345****",
"deviceName":"deviceName1234",
"time":"2018-08-31 15:32:28.205",
"utcTime":"2018-08-31T07:32:28.205Z",
"lastTime":"2018-08-31 15:32:28.195",
"utcLastTime":"2018-08-31T07:32:28.195Z",
"clientIp":"192.0.2.1"
}
Offline format:
{
"status":"offline",
"iotId":"4z819VQHk6VSLmmBJfrf00107e****",
"offlineReasonCode":427,
"productKey":"al12345****",
"deviceName":"deviceName1234",
"time":"2018-08-31 15:32:28.205",
"utcTime":"2018-08-31T07:32:28.205Z",
"lastTime":"2018-08-31 15:32:28.195",
"utcLastTime":"2018-08-31T07:32:28.195Z",
"clientIp":"192.0.2.1"
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
status |
String |
The status of the device.
|
|
iotId |
String |
The unique identifier of the device in IoT Platform. |
|
offlineReasonCode |
Integer |
The error code when the device goes offline. Device behavior error codes. |
|
productKey |
String |
The unique identifier of the product to which the device belongs. |
|
deviceName |
String |
The name of the device. |
|
lastTime |
String |
Deprecated. No longer used. |
|
utcLastTime |
String |
|
|
time |
String |
The time when the device went online or offline. Messages are not sorted by online/offline time. Sort them by the time value. For example, you receive the following three messages in sequence:
These three messages show that the device went offline, then online, then offline again. |
|
utcTime |
String |
The UTC time when the device went online or offline. |
|
clientIp |
String |
The public IP address of the device. |
Submit device properties
Topic: /${productKey}/${deviceName}/thing/event/property/post
Reports properties submitted by a device.
Data format:
{
"iotId":"4z819VQHk6VSLmmBJfrf00107e****",
"requestId":"2",
"productKey":"al12345****",
"deviceName":"deviceName1234",
"gmtCreate":1510799670074,
"deviceType":"Ammeter",
"items":{
"Power":{
"value":"on",
"time":1510799670074
},
"Position":{
"time":1510292697470,
"value":{
"latitude":39.9,
"longitude":116.38
}
}
},
"checkFailedData":{
"attribute_8":{
"time": 1510292697470,
"value": 715665571,
"code":6304,
"message":"tsl parse: params not exist -> attribute_8"
}
}
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
iotId |
String |
The unique identifier of the device in IoT Platform. |
|
requestId |
String |
The Id from the raw device message. A numeric string in the range 0 to 4294967295. Must be unique per device. |
|
productKey |
String |
The unique identifier of the product to which the device belongs. |
|
deviceName |
String |
The name of the device. |
|
gmtCreate |
Long |
The time when the data forwarding message was generated. |
|
deviceType |
String |
The category of the device. Set when creating a product (Create a product or CreateProduct). |
|
items |
Object |
The device data. |
|
Power |
String |
The property identifier. For property names, see the TSL description of the product. If the property is a custom module property, the property identifier is in the
|
|
Position |
||
|
attribute_8 |
||
|
checkFailedData |
Object |
The data that fails the TSL model data validation. |
|
value |
Defined by TSL |
The property value. |
|
time |
Long |
The time when the property was reported. Defaults to the time when IoT Platform generates the data if not reported by the device. |
|
code |
Integer |
The error code for TSL validation failures. Error codes for devices. |
|
message |
String |
The error message returned when data fails TSL model validation, including the failure cause and invalid parameters. |
Submit device events
Topic: /${productKey}/${deviceName}/thing/event/${tsl.event.identifier}/post
Reports events submitted by a device.
Data format:
{
"identifier":"BrokenInfo",
"name":"Damage Rate Submission",
"type":"info",
"iotId":"4z819VQHk6VSLmmBJfrf00107e****",
"requestId":"2",
"productKey":"X5eCzh6****",
"deviceName":"5gJtxDVeGAkaEztpisjX",
"gmtCreate":1510799670074,
"value":{
"Power":"on",
"Position":{
"latitude":39.9,
"longitude":116.38
}
},
"checkFailedData":{},
"time":1510799670074
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
identifier |
String |
The identifier of the event. If the event is a custom module event, the event identifier is in the
|
|
name |
String |
The name of the event. |
|
type |
String |
The event type. For event types, see the TSL description of the product. |
|
iotId |
String |
The unique identifier of the device in IoT Platform. |
|
requestId |
String |
The Id from the raw device message. A numeric string in the range 0 to 4294967295. Must be unique per device. |
|
productKey |
String |
The unique identifier of the product to which the device belongs. |
|
deviceName |
String |
The name of the device. |
|
gmtCreate |
Long |
The time when the data forwarding message was generated. |
|
value |
Object |
The output parameter information of the event. The example shows information about the two parameters Power and Position.
Important
|
|
checkFailedData |
Object |
The data that fails the TSL model data validation. If the output parameters of the event fail the validation, the checkFailedData parameter is:
Where:
|
|
time |
Long |
The time when the event was reported. Defaults to the time when IoT Platform generates the data if not reported by the device. |
Submit device properties in batches
Topic: /${productKey}/${deviceName}/thing/property/batch/post
Reports properties submitted by a device in batches.
Data format:
{
"productKey": "al12345****",
"deviceName": "deviceName1234",
"instanceId": "iot-0***",
"requestId": "2",
"items": {
"Power": [
{
"value": "on",
"time": 1524448722000
},
{
"value": "off",
"time": 1524448722001
}
],
"WF": [
{
"value": 3,
"time": 1524448722000
},
{
"value": 4,
"time": 1524448722009
}
]
}
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
productKey |
String |
The unique identifier of the product to which the device belongs. |
|
deviceName |
String |
The name of the device. |
|
instanceId |
String |
The ID of the instance to which the device belongs. |
|
requestId |
String |
The Id from the raw device message. A numeric string in the range 0 to 4294967295. Must be unique per device. |
|
items |
Object |
The device data. |
|
Power |
String |
The property identifier. For property names, see the TSL description of the product. If the property is a custom module property, the property identifier is in the
|
|
WF |
||
|
value |
Defined by TSL |
The property value. |
|
time |
Long |
The time when the property was reported. Defaults to the time when IoT Platform generates the data if not reported by the device. |
Submit device events in batches
Topic: /${productKey}/${deviceName}/thing/event/batch/post
Reports events submitted by a device in batches.
Data format:
{
"productKey": "al12345****",
"deviceName": "deviceName1234",
"instanceId": "iot-0***",
"requestId": "2",
"items": {
"alarmEvent": [
{
"value": {
"Power": "on",
"WF": "2"
},
"time": 1524448722000
},
{
"value": {
"Power": "on",
"WF": "2"
},
"time": 1524448723000
}
]
}
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
productKey |
String |
The unique identifier of the product to which the device belongs. |
|
deviceName |
String |
The name of the device. |
|
instanceId |
String |
The ID of the instance to which the device belongs. |
|
requestId |
String |
The Id from the raw device message. A numeric string in the range 0 to 4294967295. Must be unique per device. |
|
items |
Object |
The device data. |
|
alarmEvent |
List |
The identifier of the event. |
|
value |
Object |
The parameters of the event. In the preceding example, Power and WF are the parameter names of the event. |
|
time |
Long |
The time when the event was reported. Defaults to the time when IoT Platform generates the data if not reported by the device. |
Device lifecycle changes
Topic: /${productKey}/${deviceName}/thing/lifecycle
Reports device creation, deletion, enablement, and disablement events.
Data format:
{
"action": "create|delete|enable|disable",
"iotId": "4z819VQHk6VSLmmBJfrf00107e****",
"productKey": "al5eCzh****",
"deviceName": "5gJtxDVeGAkaEztpisjX",
"deviceSecret": "wsde***",
"messageCreateTime": 1510292739881
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
action |
String |
|
|
iotId |
String |
The unique identifier of the device in IoT Platform. |
|
productKey |
String |
The unique identifier of the product. |
|
deviceName |
String |
The name of the device. |
|
deviceSecret |
String |
The device secret. This parameter is included only if the action parameter is set to |
|
messageCreateTime |
Integer |
The timestamp when the message was generated. Unit: millisecond. |
Device topology changes
Topic: /${productKey}/${deviceName}/thing/topo/lifecycle
Reports topology changes between a sub-device and a gateway.
Data format:
{
"action" : "create|delete|enable|disable",
"gwIotId": "dfaejVQHk6VSLmmBJfrf00107e****",
"gwProductKey": "al5eCzh****",
"gwDeviceName": "deviceName1234",
"devices": [
{
"iotId": "4z819VQHk6VSLmmBJfrf00107e****",
"productKey": "ala4Czh****",
"deviceName": "deviceName1234"
}
],
"messageCreateTime": 1510292739881
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
action |
String |
|
|
gwIotId |
String |
The unique identifier of the gateway device in IoT Platform. |
|
gwProductKey |
String |
The unique identifier of the gateway product. |
|
gwDeviceName |
String |
The name of the gateway device. |
|
devices |
Object |
The list of sub-devices that are changed. |
|
iotId |
String |
The unique identifier of the sub-device in IoT Platform. |
|
productKey |
String |
The unique identifier of the sub-device product. |
|
deviceName |
String |
The name of the sub-device. |
|
messageCreateTime |
Integer |
The timestamp when the message was generated. Unit: millisecond. |
Gateway discovers sub-devices
Topic: /${productKey}/${deviceName}/thing/list/found
Reports sub-device information detected by a gateway.
Data format:
{
"gwIotId":"dfaew9VQHk6VSLmmBJfrf00107e****",
"gwProductKey":"al12345****",
"gwDeviceName":"deviceName1234",
"devices":[
{
"iotId":"4z819VQHk6VSLmmBJfrf00107e****",
"productKey":"alr56g9****",
"deviceName":"deviceName1234"
}
]
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
gwIotId |
String |
The unique identifier of the gateway device in IoT Platform. |
|
gwProductKey |
String |
The unique identifier of the gateway product. |
|
gwDeviceName |
String |
The name of the gateway device. |
|
devices |
Object |
The list of discovered sub-devices. |
|
iotId |
String |
The unique identifier of the sub-device in IoT Platform. |
|
productKey |
String |
The unique identifier of the product to which the sub-device belongs. |
|
deviceName |
String |
The name of the sub-device. |
Results of downstream commands
Topic: /${productKey}/${deviceName}/thing/downlink/reply/message
Reports results of asynchronous property setting and service invocation commands processed by a device. Also returns error messages for failed commands.
Data format:
{
"gmtCreate":1510292739881,
"iotId":"4z819VQHk6VSLmmBJfrf00107e****",
"productKey":"al12355****",
"deviceName":"deviceName1234",
"requestId":"2",
"code":200,
"message":"success",
"topic":"/sys/al12355****/deviceName1234/thing/service/property/set",
"data":{},
"checkFailedData":{
"value": {
"PicID": "15194139"
},
"code":6304,
"message":"tsl parse: params not exist -> PicID"
}
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
gmtCreate |
Long |
The UTC timestamp. |
|
iotId |
String |
The unique identifier of the device in IoT Platform. |
|
productKey |
String |
The unique identifier of the product to which the device belongs. |
|
deviceName |
String |
The name of the device. |
|
requestId |
String |
The Id from the raw device message. A numeric string in the range 0 to 4294967295. Must be unique per device. |
|
code |
Integer |
The device result code. Values are listed in the Result codes table. |
|
message |
String |
The result code information that the device returns. |
|
topic |
String |
The information about the topic that is used to send the command to the device. |
|
data |
Object |
The result returned by the device. For Alink format data, the device processing result is returned directly. For pass-through format data, the data must be transformed by a script. |
|
checkFailedData |
Object |
The data that fails the TSL model data validation. |
|
value |
Defined by TSL |
The property value or service parameter value that fails the TSL model data validation. In the preceding example, PicID is the name of the parameter that fails the validation. |
|
code |
Integer |
The error code for TSL validation failures. Error codes for devices. |
|
message |
String |
The error message returned when data fails TSL model validation, including the failure cause and invalid parameters. |
|
code |
message |
Description |
|
200 |
success |
The request is successful. |
|
400 |
request error |
An internal service error occurred during processing. |
|
460 |
request parameter error |
Invalid request parameter. The device failed to validate the input parameter. |
|
429 |
too many requests |
Too many requests. |
|
9200 |
device not actived |
The device is not activated. |
|
9201 |
device offline |
The device is offline. |
|
403 |
request forbidden |
The request is forbidden due to an overdue payment. |
Resolve these errors using the Error codes for devices reference.
Submit historical properties
Topic: /${productKey}/${deviceName}/thing/event/property/history/post
Reports historical TSL property data submitted by a device.
Data format:
{
"iotId":"4z819VQHk6VSLmmBJfrf00107e****",
"requestId":"2",
"productKey":"12345****",
"deviceName":"deviceName1234",
"gmtCreate":1510799670074,
"deviceType":"Ammeter",
"items":{
"Power":{
"value":"on",
"time":1510799670074
},
"Position":{
"time":1510292697470,
"value":{
"latitude":39.9,
"longitude":116.38
}
}
},
"checkFailedData":{
"attribute_8":{
"time": 1510292697470,
"value": 715665571,
"code":6304,
"message":"tsl parse: params not exist -> attribute_8"
}
}
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
iotId |
String |
The unique identifier of the device in IoT Platform. |
|
requestId |
String |
The Id from the raw device message. A numeric string in the range 0 to 4294967295. Must be unique per device. |
|
productKey |
String |
The unique identifier of the product to which the device belongs. |
|
deviceName |
String |
The name of the device. |
|
gmtCreate |
Long |
The time when the data forwarding message was generated. |
|
deviceType |
String |
The category of the device. Set when creating a product (Create a product or CreateProduct). |
|
items |
Object |
The device data. |
|
Power |
String |
The property identifier. For property names, see the TSL description of the product. If the property is a custom module property, the property identifier is in the
|
|
Position |
||
|
attribute_8 |
||
|
checkFailedData |
Object |
The data that fails the TSL model data validation. |
|
value |
Defined by TSL |
The property value. |
|
time |
Long |
The time when the property was reported. Defaults to the time when IoT Platform generates the data if not reported by the device. |
|
code |
Integer |
The error code for TSL validation failures. Error codes for devices. |
|
message |
String |
The error message returned when data fails TSL model validation, including the failure cause and invalid parameters. |
Submit historical events
Topic: /${productKey}/${deviceName}/thing/event/${tsl.event.identifier}/history/post
Reports historical event data submitted by a device.
Data format:
{
"identifier":"BrokenInfo",
"name":"Damage Rate Submission",
"type":"info",
"iotId":"4z819VQHk6VSLmmBJfrf00107e***",
"requestId":"2",
"productKey":"X5eCzh6***",
"deviceName":"5gJtxDVeGAkaEztpisjX",
"value":{
"Power":"on",
"Position":{
"latitude":39.9,
"longitude":116.38
}
},
"checkFailedData":{},
"time":1510799670074
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
identifier |
String |
The identifier of the event. If the event is a custom module event, the event identifier is in the
|
|
name |
String |
The name of the event. |
|
type |
String |
The event type. For event types, see the TSL description of the product. |
|
iotId |
String |
The unique identifier of the device in IoT Platform. |
|
requestId |
String |
The Id from the raw device message. A numeric string in the range 0 to 4294967295. Must be unique per device. |
|
productKey |
String |
The unique identifier of the product to which the device belongs. |
|
deviceName |
String |
The name of the device. |
|
gmtCreate |
Long |
The time when the data forwarding message was generated. |
|
value |
Object |
The output parameter information of the event. The example shows information about the two parameters Power and Position.
Important
|
|
checkFailedData |
Object |
The data that fails the TSL model data validation. If the output parameters of the event fail the validation, the checkFailedData parameter is:
Where:
|
|
time |
Long |
The time when the event was reported. Defaults to the time when IoT Platform generates the data if not reported by the device. |
OTA update status notifications
Topic: /${productKey}/${deviceName}/ota/upgrade
Reports OTA update results (success, failure, or cancellation).
If a device has an unfinished update task and you initiate a batch update, the batch update fails. IoT Platform does not forward the failure message in this case.
Data format:
{
"iotId": "4z819VQHk6VSLmmBJfrf00107e****",
"productKey": "X5eCzh6****",
"deviceName": "deviceName1234",
"moduleName": "default",
"status": "SUCCEEDED|FAILED|CANCELED",
"messageCreateTime": 1571323748000,
"srcVersion": "1.0.1",
"destVersion": "1.0.2",
"desc": "success",
"jobId": "wahVIzGkCMuAUE2gDERM02****",
"taskId": "y3tOmCDNgpR8F9jnVEzC01****"
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
iotId |
String |
The unique identifier of the device. |
|
productKey |
String |
The unique identifier of the product to which the device belongs. |
|
deviceName |
String |
The name of the device. |
|
moduleName |
String |
The name of the OTA module. |
|
status |
String |
The update status.
|
|
messageCreateTime |
Long |
The timestamp when the message was generated. Unit: millisecond. |
|
srcVersion |
String |
The version before the update. |
|
destVersion |
String |
The destination version of the update. |
|
desc |
String |
The description of the update status. |
|
jobId |
String |
The update batch ID. Uniquely identifies the update batch. |
|
taskId |
String |
The unique identifier of the device update record. |
OTA update progress notifications
Topic: /${productKey}/${deviceName}/ota/progress/post
Reports OTA update progress.
Data format:
{
"iotId": "4z819VQHk6VSLmmBJfrf00107e****",
"productKey": "X5eCzh6****",
"deviceName": "deviceName1234",
"moduleName":"default",
"status":"IN_PROGRESS",
"step": "90",
"messageCreateTime": 1571323748000,
"srcVersion":"1.0.1",
"destVersion":"1.0.2",
"desc": "success",
"jobId": "wahVIzGkCMuAUE2gDERM02****",
"taskId": "y3tOmCDNgpR8F9jnVEzC01****"
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
iotId |
String |
The unique identifier of the device. |
|
productKey |
String |
The unique identifier of the product to which the device belongs. |
|
deviceName |
String |
The name of the device. |
|
moduleName |
String |
The name of the OTA module. |
|
status |
String |
The update status. The value is fixed to |
|
step |
Integer |
The update progress reported by the device. |
|
messageCreateTime |
Long |
The timestamp when the message was generated. Unit: millisecond. |
|
srcVersion |
String |
The version before the update. |
|
destVersion |
String |
The destination version of the update. |
|
desc |
String |
The description of the update status. |
|
jobId |
String |
The update batch ID. Uniquely identifies the update batch. |
|
taskId |
String |
The unique identifier of the device update record. |
OTA module version change notifications
Topic: /${productKey}/${deviceName}/ota/version/post
Reports OTA module version numbers when a device submits a new version.
Data format:
{
"iotId": "4z819VQHk6VSLmmBJfrf00107e****",
"deviceName": "deviceName1234",
"productKey": "X5eCzh6****",
"moduleName": "BarcodeScanner",
"moduleVersion": "1.0.3",
"messageCreateTime": 1571323748000
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
iotId |
String |
The unique identifier of the device. |
|
productKey |
String |
The unique identifier of the product to which the device belongs. |
|
deviceName |
String |
The name of the device. |
|
moduleName |
String |
The name of the module. |
|
moduleVersion |
String |
The version number of the module. |
|
messageCreateTime |
Long |
The timestamp when the message was generated. Unit: millisecond. |
OTA update batch status notifications
Topic: /${productKey}/${packageId}/${jobId}/ota/job/status
Reports OTA update batch status changes.
Data format:
{
"productKey": "X5eCzh6****",
"moduleName": "BarcodeScanner",
"packageId": "wahVIzGkCMuAUE2***",
"jobId": "wahVIzGkCMuAUE2gDERM02****",
"state": "IN_PROGRESS",
"messageCreateTime": 1571323748000
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
productKey |
String |
The unique identifier of the product to which the device belongs. |
|
moduleName |
String |
The name of the module. |
|
packageId |
String |
The ID of the update package. The value of this parameter is the same as the value of the FirmwareId parameter that is returned when you call the CreateOTAFirmware operation to create an update package. |
|
jobId |
String |
The update batch ID. Uniquely identifies the update batch. |
|
state |
String |
The status of the update batch. Valid values:
|
|
messageCreateTime |
Long |
The timestamp when the message was generated. Unit: millisecond. |
Device tag changes
Topic: /${productKey}/${deviceName}/thing/deviceinfo/update
Reports device tag changes.
Data format:
{
"action": "UPDATE|DELETE|DELETEALL"
"iotId": "4z819VQHk6VSLmmBJfrf00107e****",
"productKey": "X5eCzh6****",
"deviceName": "deviceName1234",
"deletedAttrKeyList": ["abc", "def", "rng"],
"value": [
{
"attrKey": "tagKey",
"attrValue": "tagValue"
}
],
"messageCreateTime": 1510799670074
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
action |
String |
The type of tag change. Valid values:
|
|
iotId |
String |
The unique identifier of the device. |
|
productKey |
String |
The unique identifier of the product to which the device belongs. |
|
deviceName |
String |
The name of the device. |
|
deletedAttrKeyList |
List |
The list of keys of the deleted tags. This parameter is displayed only when the action parameter is set to DELETE. |
|
value |
List |
The tag data. |
|
attrKey |
String |
The tag key. |
|
attrValue |
String |
The tag value. |
|
messageCreateTime |
Long |
The timestamp when the message was generated. Unit: millisecond. |
Device job status notifications
Topic: /sys/uid/${uid}/job/${jobId}/lifecycle
Reports status changes for device jobs, including batch property setting, batch service invocation, and custom jobs.
In the topic, ${uid} is your Alibaba Cloud account ID. To view the ID, log on to the IoT Platform console, click your profile picture, and navigate to the Security Settings page.
Data format:
{
"jobId": "4z819VQHk6VSLmm***ee200",
"jobType": "CUSTOM_JOB",
"status": "INITIALIZING",
"messageCreateTime": 1510292739881
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
jobId |
String |
The job ID. Globally unique identifier of the job. |
|
jobType |
String |
The job type.
|
|
status |
String |
The job status. Valid values:
|
|
messageCreateTime |
Long |
The timestamp when the message was generated. Unit: millisecond. |
Instance migration job status notifications
Topic: /sys/uid/{uid}/distribution/{jobId}/lifecycle
Reports status changes for instance migration jobs.
In the topic, ${uid} is your Alibaba Cloud account ID. To find your account ID, log on to the IoT Platform console, move the mouse pointer over your profile picture, and view the Account ID.
Data format:
{
"jobId": "4z819VQHk6VSLmmxxxxxxxxxxee200",
"status": "GRAY_EXECUTING",
"messageCreateTime": 1510292739881,
"type":"INSTANCE_UPGRADE",
"sourceInstance":"iotx-oxssharez200",
"targetInstance":"iot-es5v4***",
"successDevices":[
{
"productKey":"al12***",
"deviceName":"deviceName1",
"iotId":"4z81frf00107e***"
}
]
}
Parameter descriptions:
|
Parameter |
Type |
Description |
|
jobId |
String |
The job ID. Globally unique identifier of the job. |
|
status |
String |
The job status. Valid values:
|
|
messageCreateTime |
Long |
The timestamp when the message was generated. Unit: millisecond. |
|
type |
String |
The job type. The value is fixed to |
|
sourceInstance |
String |
The ID of the source public instance for the instance migration. The ID of an earlier-version public instance is Instance details are covered in Overview of instances. |
|
targetInstance |
String |
The ID of the target Enterprise instance for the instance migration. |
|
successDevices |
List |
Information about the devices that are successfully migrated:
The successDevices parameter may be empty during the migration process. This indicates that the job status has changed and the job has started, but no devices have been migrated yet. |
|
productKey |
String |
The unique identifier of the product to which the device belongs. |
|
deviceName |
String |
The name of the device. |
|
iotId |
String |
The unique identifier of the device in IoT Platform. |