live_start_push

DJI Services · live · live_start_push

Request Params

vendor
string
必填
固定 dji
device_id
string
必填
目标设备 ID
command_type
string
必填
固定 live_start_push
idempotency_key
string
必填
幂等键;重复请求返回同一命令
timeout_seconds
integer
超时秒数,范围 0~300
payload.url_type
integer
必填
URL type: 0=Agora, 1=RTMP, 3=GB28181, 4=WebRTC
payload.url
string
必填
Live stream URL/parameters
payload.video_id
string
必填
Video stream ID (format: //)
payload.video_quality
integer
必填
Video quality: 0=adaptive, 1=smooth, 2=standard, 3=high, 4=super

Create Response

command_id
string(uuid)
平台命令受理标识,全平台唯一 UUID
status
string
受理状态:ACCEPTED
accepted_at
string(datetime)
命令受理时间(UTC)

Query Response

command_id
string(uuid)
平台命令受理标识,全平台唯一 UUID
status
string
执行状态:ACCEPTED / DELIVERED / SUCCEEDED / FAILED / TIMED_OUT / UNMATCHED_RESPONSE
vendor
string
厂商标识,固定为 dji
device_id
string
目标设备 ID
command_type
string
method 名称
response_code
string
设备侧执行码
response_message
string
设备侧执行信息
vendor_response
object
原始厂商回包(透传)

DJI Services Reply Mapping

设备通过 services_reply 返回命令结果,平台使用 tid 关联到 command_id 并更新命令状态。接入方不需要直接处理 MQTT 回包。
Open Platform 字段DJI services_reply 来源
response_code优先使用 data.code;不存在时回退到 data.result
response_messagedata.message / data.msg / data.description
vendor_responseDJI 回包摘要,保留 resultcodemessageoutput 等原始扩展字段
data.result = 0 表示设备侧执行成功;非 0 表示设备侧执行失败,平台会将命令推进为失败终态。
curl -X POST "/api/v1/open/downlink/commands" \
  -H "Content-Type: application/json" \
  -H "X-Api-Id: YOUR_API_ID" \
  -H "X-Api-Timestamp: YOUR_UNIX_SECONDS" \
  -H "X-Api-Nonce: YOUR_NONCE" \
  -H "X-Api-Signature: YOUR_SIGNATURE" \
  -d '{"vendor":"dji","device_id":"drone-001","command_type":"live_start_push","payload":{"url_type":0,"url":"https://example.com/path","video_id":"id-001","video_quality":0},"idempotency_key":"req-live_start_push-001","timeout_seconds":30}'

curl "/api/v1/open/downlink/commands/37aa996e-2ed9-8eb1-fff6-6c30169b2499"
{
  "command_id": "37aa996e-2ed9-8eb1-fff6-6c30169b2499",
  "status": "ACCEPTED",
  "accepted_at": "2026-04-22T12:00:00Z"
}