90.log
Event
File upload progress notification
Topic: thing/product/{gateway_sn}/events
Direction: up
Method: fileupload_progress
Data:
result
Return code
int
Non-zero represents an error
output
Output
struct
»ext
Extended information
struct
»»files
File list
array
{"size": -, "item_type": struct}
»»»module
Belonging device type
enum_int
{"0":"Aircraft","3":"Dock"}
»»»size
File size
int
byte
»»»device_sn
Device serial number (SN)
text
»»»key
Object storage bucket Key
text
»»»fingerprint
File fingerprint
text
»»»progress
Progress information
struct
»»»»progress
Progress value
int
»»»»finish_time
Time of completion for the upload
int
»»»»upload_rate
Upload rate
int
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"output": {
"ext": {
"files": [
{
"device_sn": "drone_sn",
"fingerprint": "4f65b891f3bc09bdb6d4c36a996b532d",
"key": "4bf0039f-6434-44a8-b891-8d7b6b7ff138/drone_sn/video_20220621_110830.log",
"module": "0",
"progress": {
"current_step": 19,
"finish_time": 1655781395926,
"progress": 100,
"result": 0,
"status": "ok",
"upload_rate": 0
},
"size": 155232
},
{
"device_sn": "dock_sn",
"fingerprint": "4f65b891f3bc09bdb6d4c36a996b532d",
"key": "4bf0039f-6434-44a8-b891-8d7b6b7ff138/dock_sn/video_20220621_110830.log",
"module": "3",
"progress": {
"current_step": 19,
"finish_time": 1655781395926,
"progress": 100,
"result": 0,
"status": "ok",
"total_step": 30,
"upload_rate": 0
},
"size": 155232
}
]
},
"status": "ok"
}
},
"gateway": "dock_sn",
"need_reply": 0,
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1655781395926
}Service
Get the list of files that can be uploaded by the device
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: fileupload_list
Data:
module_list
File belonging filter list
array
{"size": -, "item_type": enum_int}
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"module_list": [
"0",
"3"
]
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655
}Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: fileupload_list
Data:
files
array
{"size": 2, "item_type": struct}
»device_sn
Device serial number (SN)
text
»result
Return code
int
Non-zero represents an error
»module
Belonging device type
enum_int
{"0":"Aircraft","3":"Dock"}
»list
File index list
array
{"size": -, "item_type": struct}
»»boot_index
File index
int
»»start_time
Log start time
int
{"unit_name":"Milliseconds / ms"}
»»end_time
Log end time
int
{"unit_name":"Milliseconds / ms"}
»»size
Log file size
int
byte
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"files": [
{
"device_sn": "xxxxxxxxx",
"list": [
{
"boot_index": 1111,
"end_time": 1659427398806,
"size": 33789,
"start_time": 1654070968655
},
{
"boot_index": 22222,
"end_ime": 1659427398806,
"size": 33789,
"start_time": 1659427398806
}
],
"module": "0",
"result": 0
},
{
"device_sn": "device_sn",
"list": [
{
"boot_index": 11111,
"end_time": 1659427398806,
"size": 36772,
"start_time": 1659427398806
},
{
"boot_index": 22222,
"end_ime": 1659427398806,
"size": 33789,
"start_time": 1659427398806
}
],
"module": "3",
"result": 0
}
],
"result": 0
},
"gateway": "",
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655
}Initiate the upload of log files
Upon receiving the command from the server, the device will directly return the execution result state
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: fileupload_start
Data:
bucket
Object storage bucket name
text
region
Region where the data center is located
text
credentials
Credential information
struct
»access_key_id
Access key ID
text
»access_key_secret
Secret access key
text
»expire
Access key expiration time
int
{"step":"1","unit_name":"Seconds / s"}
»security_token
Session token
text
endpoint
Access domain for external services
text
provider
Cloud provider enumeration values
enum_string
{"ali":"Alibaba Cloud","aws":"Amazon Cloud","minio":"minio"}
params
struct
»files
array
{"size": -, "item_type": struct}
»»object_key
Key of the file in the object storage bucket
text
»»module
Log belonging module
text
»»list
Log list
array
{"size": -, "item_type": struct}
»»»boot_index
Log index
int
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"bucket": "stg-dji-service-hz-ksd7",
"credentials": {
"access_key_id": "STS.access_key_id",
"access_key_secret": "access_key_secret",
"expire": 1659432522000,
"security_token": "security_token"
},
"endpoint": "https://oss-cn-hangzhou.aliyuncs.com",
"params": {
"files": [
{
"list": [
{
"boot_index": 321
},
{
"boot_index": 322
}
],
"module": "3",
"object_key": "object_key"
}
]
},
"provider": "ali",
"region": "hz"
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1659429523120
}Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: fileupload_start
Data:
result
Return code
int
Non-zero represents an error
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"result": 0
},
"gateway": "",
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1655781392412
}Update the upload state
Upon receiving the command from the server, the device will directly return the execution result state
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: fileupload_update
Data:
status
Upload state
enum_string
{"cancel":"Cancelled"}
module_list
Log belonging module list
array
{"size": -, "item_type": }
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"module_list": [
"0",
"3"
],
"status": "cancel"
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx"
}Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: fileupload_update
Data:
result
Return code
int
Non-zero represents an error
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"result": 0
},
"gateway": "",
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1655781392412
}Last updated