跳到主要内容

Media Management

Event

Reporting Media File Upload Results

Topic: thing/product/{gateway_sn}/events

Direction: up

Method: file_upload_callback

Data:

ColumnNameTypeconstraintDescription
fileFile Informationstruct
»object_keyFile Key in Storage Buckettext
»pathFile Business Pathtext
»nameFile Nametext
»extFile Extension Contentstruct
»»flight_idTask IDtext
»»drone_model_keyUAV Product Keytext
»»payload_model_keyPayload Product Keytext
»»is_originalIs 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 Locationstruct
»»»latLatitude of Capturefloat
»»»lngLongitude of Capturefloat

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"file": {
"ext": {
"drone_model_key": "0-4",
"flight_id": "xxx",
"is_original": true,
"payload_model_key": "0-4"
},
"metadata": {
"absolute_altitude": 56.311,
"create_time": "2024-01-10 16:04:20",
"gimbal_yaw_degree": "0",
"relative_altitude": 41.124,
"shoot_position": {
"lat": 22.1,
"lng": 144.5
}
},
"name": "dog.jpeg",
"object_key": "object_key",
"path": "xxx"
}
},
"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"}

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
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
»endpointPublic service access domaintext
»providerCloud provider enumenum_string{"ali":"Alibaba Cloud","aws":"Amazon Web Services","minio":"Minio"}
»regionRegion where the data center is locatedtext
»object_key_prefixPrefix for the object key in the 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": 1709192149431,
"method": "storage_config_get"
}