创建任务
POST
/task/api/v1.0/projects/{project_uuid}/flight-tasks
请求参数
Path 参数
project_uuid
string
必需
Header 参数
X-Organization-Key
string
组织密钥
示例值:
{{organization_key}}
Body 参数application/json
name
string
计划名称
sn
string
起飞机场SN
landing_dock_sn
string
可选
time_zone
string
必需
wayline_uuid
string
航线文件uuid
rth_altitude
number
必需
rth_mode
enum<integer>
可选
枚举值:
01
默认值:
1
wayline_precision_type
enum<integer>
可选
枚举值:
01
默认值:
1
out_of_control_action_in_flight
enum<integer>
必需
枚举值:
12
resumable_status
enum<string>
必需
枚举值:
automanual
tags
array[string]
设备直传标签
>= 0 items<= 10 items
media_direct_transfer
boolean
可选
默认值:
false
task_type
enum<integer>
必需
枚举值:
1
示例
{
"name": "斗战影红给热",
"sn": "DOCKSN1",
"landing_dock_sn": "DOCKSN2",
"time_zone": "Asia/Chongqing",
"wayline_uuid": "3f6fa0d6-765d-4b7d-92c5-1a2213b8c0f0",
"rth_altitude": 24,
"out_of_control_action_in_flight": 2,
"resumable_status": "auto",
"task_type": 1
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/task/api/v1.0/projects//flight-tasks' \
--header 'X-Organization-Key: {{organization_key}}' \
--header 'X-Organization-Key;' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "斗战影红给热",
"sn": "DOCKSN1",
"landing_dock_sn": "DOCKSN2",
"time_zone": "Asia/Chongqing",
"wayline_uuid": "3f6fa0d6-765d-4b7d-92c5-1a2213b8c0f0",
"rth_altitude": 24,
"out_of_control_action_in_flight": 2,
"resumable_status": "auto",
"task_type": 1
}'
返回响应
🟢200成功
application/json
Body
body
object
必需
code
integer
必需
data
object
必需
message
string
必需
headers
object
必需
size
integer
必需
status
integer
必需
示例
{
"body": {
"code": 0,
"data": {
"task": {
"begin_at": 1718705485,
"uuid": "1280bab3-3b0d-4517-a53c-3257e48319e5",
"wayline_validity_check_codes": null
}
},
"message": "success"
},
"headers": {},
"size": 152,
"status": 200
}
🟢200成功