DJI 设备请求

DJI 设备请求用于查询由设备主动发起、需要云端业务系统处理的请求。开放平台会为每条请求生成 request_id,并保留原始请求载荷,便于接入方识别业务类型并决定是否回复。

Endpoint

  • 查询列表:GET /api/v1/open/device-requests
  • 查询详情:GET /api/v1/open/device-requests/{requestId}

调用流程

  1. 设备上报请求后,平台记录 request_id 与原始 inbound_payload
  2. 业务侧通过列表接口筛选目标请求(按 vendor / device_id / request_type)。
  3. 业务侧通过详情接口读取单条请求上下文。
  4. 若需显式业务回复,调用 DJI Requests Reply 页面对应接口写回。

Authentication

  • API ID + API Key + 请求签名
  • scope:open:device-request:read

Path Parameters

NameTypeRequiredDescription
requestIdstringyes(详情查询)设备请求唯一标识(UUID)

Query Parameters

NameTypeRequiredDescription
vendorstringno厂商过滤
device_idstringno设备 ID 过滤
request_typestringno请求类型过滤

Request Body

无。requests 查询接口使用路径参数与 query 参数;显式回复请使用 requests-reply 页面描述的 POST /api/v1/open/device-requests/{requestId}/reply

Request Types

快速定位:
request_typeinbound_payload 关键字段用途
flighttask_resource_getresource_type, resource_ids请求资源(航线、媒体等)
configscope, items请求配置项读取/写入
update_topotopo_version, topo_payload请求拓扑更新

Responses

列表与详情返回同一对象结构(列表为 items[] 包裹):
FieldTypeDescription
request_idstring设备请求 ID
vendorstring厂商
device_idstring设备 ID
request_typestring设备请求类型
inbound_payloadobject原始上行负载
routing_decisionstring路由决策
reply_codestring当前回执码
reply_messagestring当前回执说明
reply_sourcestringautomanual
standardized_replyobject标准化回执内容
received_atstring(date-time)收到时间
replied_atstring(date-time) | null回复时间
updated_atstring(date-time)更新时间
列表响应示例:
{
  "items": [
    {
      "request_id": "2b0056c3-b4c8-4994-a286-047e130d38d7",
      "vendor": "dji",
      "device_id": "drone-001",
      "request_type": "config",
      "inbound_payload": {"scope":"dock","items":["network","storage"]},
      "routing_decision": "manual_reply_required",
      "reply_code": "PENDING",
      "reply_message": "awaiting cloud decision",
      "reply_source": "manual",
      "standardized_reply": {},
      "received_at": "2026-04-22T12:00:00Z",
      "replied_at": null,
      "updated_at": "2026-04-22T12:00:00Z"
    }
  ]
}
详情响应示例:
{
  "request_id": "2b0056c3-b4c8-4994-a286-047e130d38d7",
  "vendor": "dji",
  "device_id": "drone-001",
  "request_type": "config",
  "inbound_payload": {"scope":"dock","items":["network","storage"]},
  "routing_decision": "manual_reply_required",
  "reply_code": "PENDING",
  "reply_message": "awaiting cloud decision",
  "reply_source": "manual",
  "standardized_reply": {},
  "received_at": "2026-04-22T12:00:00Z",
  "replied_at": null,
  "updated_at": "2026-04-22T12:00:00Z"
}

Example

package main

import "net/http"

func main() {
  listReq, _ := http.NewRequest(http.MethodGet, "https://dev.utmos.dev/api/v1/open/device-requests?vendor=dji&device_id=drone-001&request_type=config", nil)
  listReq.Header.Set("X-Api-Id", "YOUR_API_ID")
  listReq.Header.Set("X-Api-Timestamp", "YOUR_UNIX_SECONDS")
  listReq.Header.Set("X-Api-Signature", "YOUR_SIGNATURE")
  _, _ = http.DefaultClient.Do(listReq)

  detailReq, _ := http.NewRequest(http.MethodGet, "https://dev.utmos.dev/api/v1/open/device-requests/2b0056c3-b4c8-4994-a286-047e130d38d7", nil)
  detailReq.Header.Set("X-Api-Id", "YOUR_API_ID")
  detailReq.Header.Set("X-Api-Timestamp", "YOUR_UNIX_SECONDS")
  detailReq.Header.Set("X-Api-Signature", "YOUR_SIGNATURE")
  _, _ = http.DefaultClient.Do(detailReq)
}

下一步

若请求需要业务显式回执,请进入 DJI Requests Reply 页面完成回复写回。