跳到主要内容

Media Management

Interface Changes​

✓ available, — not available. Interfaces not listed are identical on EVO Nest and Autel Nest2.

MethodFunctionEVO NestAutel Nest2Notes
file_cancelCancel File Upload—✓

Reporting Media File Upload Results​

Topic: thing/product/{gateway_sn}/events

Direction: up

Method: file_upload_callback

Data:

ColumnNameTypeconstraintDescription
resultUpload ResultintAlways 0, indicating the file was uploaded successfully
fileFile InformationstructMedia file information
»object_keyFile Key in Storage BuckettextFile key in the object storage bucket
»pathFile Business PathtextFile business path
»nameFile NametextFile name
»file_sizeFile SizetextFile size in bytes, as a string; omitted when unavailable
»widthFile WidthintPixels, reported when greater than 0
»heightFile HeightintPixels, reported when greater than 0
»extFile Extension ContentstructFile extended metadata
»»even_idAssociated Event IDarray_textString array
»»flight_idTask IDtextAssociated flight task ID
»»drone_snUAV Serial NumbertextSerial number of the aircraft that captured the file
»»drone_model_keyUAV Product KeytextAircraft product enumeration value
»»payload_model_keyPayload Product KeytextPayload product enumeration value
»»is_originalIs Original Imageint{"0":"No","1":"Yes"}Whether the image is original
»metadataMedia MetadatastructMedia metadata
»»gimbal_yaw_degreeGimbal Yaw AngledoubleGimbal yaw angle at capture time
»»absolute_altitudeAbsolute Altitude at CapturefloatAbsolute altitude at capture time
»»relative_altitudeRelative Altitude at CapturefloatRelative altitude at capture time
»»create_timeMedia Capture Timedate{"format":"iso8601"}Media file creation time
»»durationMedia Durationint{"unit_name":"seconds / s"}Video duration; 0 for photos
»»file_typeFile Typeenum_int{"0":"jpg","1":"mov","2":"mp4","3":"m4a","4":"dng"}Media file type
»»image_typeImage Typeenum_int{"0":"Wide","1":"Zoom","2":"Infrared","3":"Night"}Image channel type
»»shoot_positionCapture LocationstructCapture position coordinates
»»»latLatitude of CapturefloatCapture position latitude
»»»lngLongitude of CapturefloatCapture position longitude

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"file": {
"ext": {
"drone_model_key": "0-4",
"drone_sn": "xxxxxxxxxx",
"flight_id": "xxx",
"is_original": 1,
"payload_model_key": "0-4",
"even_id": ["1", "2"]
},
"metadata": {
"absolute_altitude": 56.311,
"create_time": "2024-01-10 16:04:20",
"duration": 0,
"file_type": 0,
"gimbal_yaw_degree": 0,
"image_type": 1,
"relative_altitude": 41.124,
"shoot_position": {
"lat": 22.1,
"lng": 144.5
}
},
"name": "dog.jpeg",
"object_key": "object_key",
"path": "xxx"
},
"result": 0
},
"gateway": "xxx",
"need_reply": 1,
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1709192149431,
"method": "file_upload_callback"
}

Requests

Get Temporary Upload Credentials​

Topic: thing/product/{gateway_sn}/requests

Direction: up

Method: storage_config_get

Data:

ColumnNameTypeconstraintDescription
moduleModule enumeration valueenum_int{"0":"Media"}Storage configuration module identifier

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"module": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1709192149431,
"method": "storage_config_get"
}

Topic: thing/product/{gateway_sn}/requests_reply

Direction: down

Method: storage_config_get

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintNon-zero indicates an error
outputOutputstructStorage configuration response
»bucketObject storage bucket nametextObject storage bucket name
»credentialsCredential informationstructTemporary access credentials
»»access_key_idAccess key IDtextTemporary Access Key ID
»»access_key_secretSecret access keytextTemporary Access Key Secret
»»expireAccess key expiration timeint{"step":"1","unit_name":"seconds / s"}Credential expiration time
»»security_tokenSession tokentextSecurity token
»endpointPublic service access domaintextObject storage service endpoint
»providerCloud provider enumenum_string{"s3":"S3-compatible storage","aws":"Amazon Web Services","amazon":"Amazon Web Services","minio":"Minio","ali":"Alibaba Cloud","oss":"Alibaba Cloud OSS","cos":"Tencent Cloud COS","qcloud":"Tencent Cloud","obs":"Huawei Cloud OBS","huawei":"Huawei Cloud"}Cloud provider enumeration
»regionRegion where the data center is locatedtextStorage bucket region
»object_key_prefixPrefix for the object key in the storage buckettextUpload file key prefix

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"output": {
"bucket": "bucket_name",
"credentials": {
"access_key_id": "access_key_id",
"access_key_secret": "access_key_secret",
"expire": 3600,
"security_token": "security_token"
},
"endpoint": "https://oss-cn-hangzhou.aliyuncs.com",
"object_key_prefix": "b4cfaae6-bd9d-4cd0-8472-63b608c3c581",
"provider": "ali",
"region": "hz"
},
"result": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1709192149431,
"method": "storage_config_get"
}

Task File Upload Status Reporting​

Topic: thing/product/{gateway_sn}/events

Direction: up

Method: file_upload_status

Data:

ColumnNameTypeconstraintDescription
tasksTask listarrayTask info array
»flight_idTask IDtextAssociated flight task ID
»total_video_filesTotal number of video filesintTotal video file count for this task
»uploaded_video_filesNumber of uploaded video filesintUploaded video file count
»total_photo_filesTotal number of photo filesintTotal photo file count for this task
»uploaded_photo_filesNumber of uploaded photo filesintUploaded photo file count
»statusUpload statusenum_int{"0":"Pending upload","1":"Upload completed","2":"Uploading","4":"Upload failed"}File upload overall status

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"tasks": [
{
"flight_id": "flight_123456",
"total_video_files": 10,
"uploaded_video_files": 0,
"total_photo_files": 10,
"uploaded_photo_files": 10,
"status": 0
},
{
"flight_id": "flight_123457",
"total_video_files": 10,
"uploaded_video_files": 0,
"total_photo_files": 10,
"uploaded_photo_files": 10,
"status": 1
},
{
"flight_id": "flight_123458",
"total_video_files": 10,
"uploaded_video_files": 0,
"total_photo_files": 10,
"uploaded_photo_files": 10,
"status": 2
}
]
},
"gateway": "xxx",
"need_reply": 1,
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1709192149431,
"method": "file_upload_status"
}

Delete Task Files​

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: file_delete

Data:

ColumnNameTypeconstraintDescription
flight_idTask IDtextFlight task ID

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"flight_id": "xxxxxxx"
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1234567890123,
"method": "file_delete"
}

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: file_delete

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintNon-zero represents an error

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"result": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1234567890123,
"method": "file_delete"
}

Re-upload Task Files​

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: file_reupload

Data:

ColumnNameTypeconstraintDescription
flight_idTask IDtextFlight task ID

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"flight_id": "xxxxxxx"
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1234567890123,
"method": "file_reupload"
}

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: file_reupload

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintNon-zero represents an error

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"result": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1234567890123,
"method": "file_reupload"
}

Cancel File Upload​

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: file_cancel

Data:

ColumnNameTypeconstraintDescription
filesFile listarrayFiles whose upload is to be cancelled
»file_pathFile pathtextFull file path, required
»file_nameFile nametextFile name, optional

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"files": [
{
"file_name": "IMG_0001.JPG",
"file_path": "/media/xxxxxxx/IMG_0001.JPG"
}
]
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1234567890123,
"method": "file_cancel"
}

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: file_cancel

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintNon-zero represents an error

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"result": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1234567890123,
"method": "file_cancel"
}