flighttask_create

DJI Services · wayline · flighttask_create

Request Params

vendor
string
required
Fixed value dji
device_id
string
required
Target device ID
command_type
string
required
Fixed value flighttask_create
idempotency_key
string
required
Idempotency key; repeated requests return the same command
timeout_seconds
integer
Timeout in seconds, range 0~300
payload.flighttask_id
string
required
Method payload field
payload.execute_time
integer
Optional execution time (timestamp)
payload.task_type
string
required
Task type: immediate, timed, conditional
payload.wayline_type
string
required
Wayline type: wayline, mapping_2d, mapping_3d, mapping_strip
payload.wayline_file
string
Wayline file URL
payload.execute_times
integer
Number of execution times
payload.out_of_control_action
string
required
Action when out of control: continue, execute_go_home, hover
payload.rth_altitude
number
Return to home altitude
payload.task_name
string
Task name
payload.ready_conditions
object
Ready conditions (for conditional tasks)
payload.executable_conditions
object
Executable conditions
payload.simulate_mission
object
Simulation settings
payload.break_point
object
Breakpoint information for resume
payload.rth_mode
integer
Return to home mode (0=smart, 1=preset)
payload.exit_wayline_when_rc_lost
integer
Exit wayline when RC lost (0=continue, 1=exit)
payload.wayline_precision_type
integer
Wayline precision type (0=GPS, 1=RTK)
payload.flight_safety_advance_check
boolean
Flight safety advance check

Create Response

command_id
string(uuid)
Platform command acceptance identifier; globally unique UUID
status
string
Acceptance status: ACCEPTED
accepted_at
string(datetime)
Command acceptance time (UTC)

Query Response

command_id
string(uuid)
Platform command acceptance identifier; globally unique UUID
status
string
Execution status: ACCEPTED / DELIVERED / SUCCEEDED / FAILED / TIMED_OUT / UNMATCHED_RESPONSE
vendor
string
Vendor identifier; fixed value dji
device_id
string
Target device ID
command_type
string
Method name
response_code
string
Device-side execution code
response_message
string
Device-side execution message
vendor_response
object
Raw vendor response (passthrough)

DJI Services Reply Mapping

The device returns command results through services_reply. The platform correlates the reply to command_id through tid and updates the command lifecycle. Clients do not consume the MQTT reply channel directly.
Open Platform fieldDJI services_reply source
response_codePrefer data.code; fall back to data.result when code is absent
response_messagedata.message / data.msg / data.description
vendor_responseNormalized DJI reply summary preserving result, code, message, output, and vendor extension fields
data.result = 0 means device-side execution succeeded. Non-zero values mean device-side execution failed, and the platform moves the command to a failed terminal state.
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":"flighttask_create","payload":{"flighttask_id":"id-001","task_type":"string","wayline_type":"string","out_of_control_action":"string","execute_time":0,"wayline_file":"string","execute_times":0,"rth_altitude":0.0,"task_name":"string","ready_conditions":{"battery_capacity":0,"begin_time":0,"end_time":0},"executable_conditions":{"storage_capacity":0},"simulate_mission":{"is_enable":0,"latitude":0.0,"longitude":0.0},"break_point":{"index":0,"state":0,"progress":0.0,"wayline_id":0,"break_reason":0,"latitude":0.0,"longitude":0.0,"height":0.0,"attitude_head":0.0},"rth_mode":0,"exit_wayline_when_rc_lost":0,"wayline_precision_type":0,"flight_safety_advance_check":true},"idempotency_key":"req-flighttask_create-001","timeout_seconds":30}'

curl "/api/v1/open/downlink/commands/7d8ba6df-d910-5a9f-cb6f-41c2211d4387"
{
  "command_id": "7d8ba6df-d910-5a9f-cb6f-41c2211d4387",
  "status": "ACCEPTED",
  "accepted_at": "2026-04-22T12:00:00Z"
}