Skip to main content

Media Management

Event

Media File Upload Priority Report

Topic: thing/product/{gateway_sn}/events

Direction: up

Method: highest_priority_upload_flighttask_media

Data:

ColumnNameTypeconstraintDescription
flight_idTask IDtextID of the task that currently has the highest priority

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"flight_id": "xxx"
},
"gateway": "xxx",
"need_reply": 1,
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "highest_priority_upload_flighttask_media"
}

Media File Upload Result Report

Topic: thing/product/{gateway_sn}/events

Direction: up

Method: file_upload_callback

Data:

ColumnNameTypeconstraintDescription
fileFile informationstruct
»object_keyKey of the file in the object storage buckettext
»pathBusiness path of the filetext
»nameFile nametext
»extFile extension contentstruct
»»flight_idTask IDtext
»»drone_model_keyAircraft product enumtext
»»payload_model_keyPayload product enumtext
»»is_originalWhether it is the original imagebool{"0":"No","1":"Yes"}
»metadataMedia metadatastruct
»»gimbal_yaw_degreeGimbal yaw anglefloat
»»absolute_altitudeAbsolute altitude at capturefloat
»»relative_altitudeRelative altitude at capturefloat
»»create_timeMedia capture timedate{"format":"iso8601"}
»»shoot_positionCapture positionstruct
»»»latLatitude of the capture positionfloat
»»»lngLongitude of the capture positionfloat

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"file": {
"cloud_to_cloud_id": "DEFAULT",
"ext": {
"drone_model_key": "0-67-0",
"flight_id": "xxx",
"is_original": true,
"payload_model_key": "0-67-0"
},
"metadata": {
"absolute_altitude": 56.311,
"create_time": "2021-05-10 16:04:20",
"gimbal_yaw_degree": "-91.40",
"relative_altitude": 41.124,
"shoot_position": {
"lat": 22.1,
"lng": 122.5
}
},
"name": "dog.jpeg",
"object_key": "object_key",
"path": "xxx"
},
"flight_task": {
"expected_file_count": 14,
"flight_type": 0,
"uploaded_file_count": 12
}
},
"gateway": "xxx",
"method": "file_upload_callback",
"need_reply": 1,
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655
}

Service

Set an Uploading File to the Highest Priority

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: upload_flighttask_media_prioritize

Data:

ColumnNameTypeconstraintDescription
flight_idTask IDtextThe task to be uploaded with the highest priority

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"flight_id": "xxx"
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "upload_flighttask_media_prioritize"
}

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: upload_flighttask_media_prioritize

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintA non-zero value indicates an error

Example:

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

Requests

Obtain Temporary Upload Credentials

Topic: thing/product/{gateway_sn}/requests

Direction: up

Method: storage_config_get

Data:

ColumnNameTypeconstraintDescription
moduleModule enumenum_int{"0":"Media"}

Example:

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

Topic: thing/product/{gateway_sn}/requests_reply

Direction: down

Method: storage_config_get

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintA non-zero value indicates an error
outputOutputstruct
»bucketObject storage bucket nametext
»credentialsCredential informationstruct
»»access_key_idAccess key IDtext
»»access_key_secretSecret access keytext
»»expireAccess key expiration timeint{"step":"1","unit_name":"Seconds / s"}
»»security_tokenSession tokentext
»endpointAccess domain of the external servicetext
»providerCloud vendor enumenum_string{"ali":"Alibaba Cloud","aws":"Amazon Web Services","minio":"minio"}
»regionRegion where the data center is locatedtext
»object_key_prefixKey prefix of the object storage buckettext

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": 1654070968655,
"method": "storage_config_get"
}