DJI 命令结果

DJI 命令结果用于查询云端命令的受理、投递、成功、失败或超时状态。设备侧回包会被平台关联到创建命令时返回的 command_id,你不需要直接处理厂商侧回包通道。

Endpoint

  • 开发者查询入口:GET /api/v1/open/downlink/commands/{commandId}
  • 命令结果通过状态查询接口返回;你不需要单独调用设备侧回包通道

Authentication

查询接口使用开放平台签名鉴权(API ID / API Key / 签名)。

Path Parameters

NameTypeRequiredDescription
commandIdstring(uuid)yes命令受理标识,全平台唯一 UUID

Query Parameters

无。

Request Body

查询接口无请求体。

Responses

状态查询响应(对齐 OpenAPI DownlinkCommandStatusResponse):
FieldTypeDescription
command_idstring(uuid)命令受理标识,全平台唯一 UUID
statusstringACCEPTED / DELIVERED / SUCCEEDED / FAILED / TIMED_OUT / UNMATCHED_RESPONSE
vendorstring厂商标识,固定 dji
device_idstring设备 ID
failure_codestring失败码(失败场景返回)
failure_reasonstring失败原因(失败场景返回)
response_codestring设备侧响应码
response_messagestring设备侧响应信息
vendor_responseobject设备回传原始扩展字段
accepted_atstring(date-time)平台受理时间
delivered_atstring(date-time)平台投递时间
completed_atstring(date-time)命令完成时间
response_received_atstring(date-time)回包入站时间
updated_atstring(date-time)记录更新时间
示例响应:
{
  "command_id": "100e2826-e45b-50cb-b41f-e8df6d20bea2",
  "status": "FAILED",
  "vendor": "dji",
  "device_id": "drone-001",
  "failure_code": "DEVICE_EXECUTION_FAILED",
  "failure_reason": "camera busy",
  "response_code": "5001",
  "response_message": "camera busy",
  "vendor_response": {"detail":"busy"},
  "accepted_at": "2026-04-22T12:00:00Z",
  "completed_at": "2026-04-22T12:00:03Z",
  "updated_at": "2026-04-22T12:00:03Z"
}

Example

package main

import "net/http"

func main() {
  req, _ := http.NewRequest(http.MethodGet, "https://dev.utmos.dev/api/v1/open/downlink/commands/100e2826-e45b-50cb-b41f-e8df6d20bea2", nil)
  req.Header.Set("X-Api-Id", "YOUR_API_ID")
  req.Header.Set("X-Api-Timestamp", "YOUR_UNIX_SECONDS")
  req.Header.Set("X-Api-Signature", "YOUR_SIGNATURE")
  _, _ = http.DefaultClient.Do(req)
}