Media Management
Interface Changes
✓ available, — not available. Interfaces not listed are identical on EVO Nest and Autel Nest2.
| Method | Function | EVO Nest | Autel Nest2 | Notes |
|---|---|---|---|---|
file_cancel | Cancel File Upload | — | ✓ |
Reporting Media File Upload Results
Topic: thing/product/{gateway_sn}/events
Direction: up
Method: file_upload_callback
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | Upload Result | int | Always 0, indicating the file was uploaded successfully | |
| file | File Information | struct | Media file information | |
| »object_key | File Key in Storage Bucket | text | File key in the object storage bucket | |
| »path | File Business Path | text | File business path | |
| »name | File Name | text | File name | |
| »file_size | File Size | text | File size in bytes, as a string; omitted when unavailable | |
| »width | File Width | int | Pixels, reported when greater than 0 | |
| »height | File Height | int | Pixels, reported when greater than 0 | |
| »ext | File Extension Content | struct | File extended metadata | |
| »»even_id | Associated Event ID | array_text | String array | |
| »»flight_id | Task ID | text | Associated flight task ID | |
| »»drone_sn | UAV Serial Number | text | Serial number of the aircraft that captured the file | |
| »»drone_model_key | UAV Product Key | text | Aircraft product enumeration value | |
| »»payload_model_key | Payload Product Key | text | Payload product enumeration value | |
| »»is_original | Is Original Image | int | {"0":"No","1":"Yes"} | Whether the image is original |
| »metadata | Media Metadata | struct | Media metadata | |
| »»gimbal_yaw_degree | Gimbal Yaw Angle | double | Gimbal yaw angle at capture time | |
| »»absolute_altitude | Absolute Altitude at Capture | float | Absolute altitude at capture time | |
| »»relative_altitude | Relative Altitude at Capture | float | Relative altitude at capture time | |
| »»create_time | Media Capture Time | date | {"format":"iso8601"} | Media file creation time |
| »»duration | Media Duration | int | {"unit_name":"seconds / s"} | Video duration; 0 for photos |
| »»file_type | File Type | enum_int | {"0":"jpg","1":"mov","2":"mp4","3":"m4a","4":"dng"} | Media file type |
| »»image_type | Image Type | enum_int | {"0":"Wide","1":"Zoom","2":"Infrared","3":"Night"} | Image channel type |
| »»shoot_position | Capture Location | struct | Capture position coordinates | |
| »»»lat | Latitude of Capture | float | Capture position latitude | |
| »»»lng | Longitude of Capture | float | Capture 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:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| module | Module enumeration value | enum_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:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | Return code | int | Non-zero indicates an error | |
| output | Output | struct | Storage configuration response | |
| »bucket | Object storage bucket name | text | Object storage bucket name | |
| »credentials | Credential information | struct | Temporary access credentials | |
| »»access_key_id | Access key ID | text | Temporary Access Key ID | |
| »»access_key_secret | Secret access key | text | Temporary Access Key Secret | |
| »»expire | Access key expiration time | int | {"step":"1","unit_name":"seconds / s"} | Credential expiration time |
| »»security_token | Session token | text | Security token | |
| »endpoint | Public service access domain | text | Object storage service endpoint | |
| »provider | Cloud provider enum | enum_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 |
| »region | Region where the data center is located | text | Storage bucket region | |
| »object_key_prefix | Prefix for the object key in the storage bucket | text | Upload 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:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| tasks | Task list | array | Task info array | |
| »flight_id | Task ID | text | Associated flight task ID | |
| »total_video_files | Total number of video files | int | Total video file count for this task | |
| »uploaded_video_files | Number of uploaded video files | int | Uploaded video file count | |
| »total_photo_files | Total number of photo files | int | Total photo file count for this task | |
| »uploaded_photo_files | Number of uploaded photo files | int | Uploaded photo file count | |
| »status | Upload status | enum_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:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| flight_id | Task ID | text | Flight 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:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | Return code | int | Non-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:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| flight_id | Task ID | text | Flight 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:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | Return code | int | Non-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:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| files | File list | array | Files whose upload is to be cancelled | |
| »file_path | File path | text | Full file path, required | |
| »file_name | File name | text | File 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:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | Return code | int | Non-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"
}