NEW FlightHub 2 OpenAPI V1.0
  1. Task Management
NEW FlightHub 2 OpenAPI V1.0
  • Root Directory
    • authentication
      • Authentication Tutorial
    • System Service
      • Query FlightHub 2 system status
    • Organize Projects
      • Organize Project Tutorial
      • Get the list of projects under the organization
      • Get the list of devices under the organization
      • Obtain the list of devices under the project
      • Obtain storage upload credentials for the project
      • Add personnel to the project
    • Device Management
      • Device Management Tutorial
      • Device Model Retrieval
      • HMS Information Retrieval
      • Real-time control command distribution
      • Dock camera switch
      • Aircraft Lens Switching
      • Control acquisition
      • Release control
      • Video transmission clarity settings
      • Custom Network RTK Calibration
    • Livestream Management
      • Livestream Management Tutorial
      • Livestream Push
        • Start livestream
      • Bypass Streaming
        • Stream forwarding error code
        • Create Stream Forwarder
        • Enable/Disable stream forwarder
        • Get stream transcoder list
        • Delete stream forwarder
    • Task Management
      • Task Management Tutorial
      • Create Flight Task
        POST
      • Updated flight task status
        PUT
      • Obtain flight task list
        GET
      • Obtain media resources generated by the Flight task
        GET
      • Obtain Flight task trajectory information
        GET
      • Obtain Flight task information
        GET
    • Flight Route Management
      • Flight Route Management Tutorial
      • Flight Route Upload Completion Notification
      • Get the list of flight routes under the project
      • Get flight route details
    • Model Management
      • Model Management Tutorial
      • Model reconstruction coordinate system
      • Get the list of models under the project
      • Get Model Details
      • Model reconstruction
    • Annotation Management
      • Annotation Management Tutorial
      • Create map annotation
  1. Task Management

Create Flight Task

Developing
POST
/openapi/v0.1/flight-task
Create a flight route task. You can obtain the flight route UUID uploaded to FlightHub 2 through the flight route upload completion notification interface, and then call this interface to create a flight route task.

Request

Header Params
X-Request-Id
string <uuid>
required
Request Unique Identifier
X-Language
enum<string> 
optional
Allowed values:
zhen
Default:
zh
X-Project-Uuid
string 
optional
Project Number
Default:
{{X-Project-Uuid}}
Body Params application/json
name
string 
required
Task name
wayline_uuid
string 
required
Flight route file UUID
sn
string 
required
Dock SN
landing_dock_sn
string 
required
Dock for landing SN, not required for multi-dock
rth_altitude
integer 
required
RTH Altitude
rth_mode
enum<string> 
required
RTH Mode
Allowed values:
optimalpreset
wayline_precision_type
enum<string> 
required
wayline_precision_type
Allowed values:
gpsrtk
out_of_control_action_in_flight
enum<string> 
required
Action of the aircraft after losing signal
Allowed values:
return_homecontinue_task
resumable_status
enum<string> 
required
Resume Flight from Breakpoint
Allowed values:
automanual
task_type
enum<string> 
required
Task Type
Allowed values:
immediatetimedrecurringcontinuous
time_zone
string 
required
Time zone, time zone name in TZ database
repeat_type
enum<string> 
required
Task Repeat Mode
Allowed values:
nonrepeatingdailyweeklyabsolute_monthlyrelative_monthly
repeat_option
required
Any of
interval
integer 
required
Repeat interval time: Minimum 1, every few days
>= 1
begin_at
integer  | null 
required
Start time, in seconds-level timestamp. Immediate Task does not require this field. For Timed Task, this value represents the task execution time. For repeating tasks and continuous tasks, this value represents the task start time.
end_at
integer  | null 
required
End time, in seconds timestamp, must be filled for recurring/continuous tasks
recurring_task_start_time_list
array[integer]
required
Multiple start times for recurring tasks, in seconds timestamp, must be on the same day as the 'begin_at' time.
continuous_task_periods
array [array] 
required
Multiple continuous task time periods, with second-level timestamps, must be on the same day as the "begin_at" time.
integer 
optional
Seconds-level timestamp
min_battery_capacity
integer 
required
Minimum battery capacity for continuous task
>= 50<= 100
Example
{
  "name": "flight_task_01",
  "sn": "8PHDM8D0010097",
  "time_zone": "Asia/Chongqing",
  "wayline_uuid": "80232917-2f63-4375-8614-0c70c4458aa3",
  "rth_altitude": 110,
  "rth_mode": "optimal",
  "wayline_precision_type": "rtk",
  "out_of_control_action_in_flight": "return_home",
  "resumable_status": "manual",
  "task_type": "immediate"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/openapi/v0.1/flight-task' \
--header 'X-Request-Id;' \
--header 'X-Language: zh' \
--header 'X-Project-Uuid: {{X-Project-Uuid}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "flight_task_01",
    "sn": "8PHDM8D0010097",
    "time_zone": "Asia/Chongqing",
    "wayline_uuid": "80232917-2f63-4375-8614-0c70c4458aa3",
    "rth_altitude": 110, 
    "rth_mode": "optimal", 
    "wayline_precision_type": "rtk", 
    "out_of_control_action_in_flight": "return_home", 
    "resumable_status": "manual",
    "task_type": "immediate"
}'

Responses

🟢200Success
application/json
Body
code
integer 
required
Non-zero indicates an exception
message
string 
required
Message prompt
data
object 
required
task_uuid
string 
required
Examples
{
  "code": 0,
  "message": "success",
  "data": {
    "task_uuid": "1280bab3-3b0d-4517-a53c-3257e48319e5"
  }
}
Previous
Task Management Tutorial
Next
Updated flight task status
Built with