编辑飞行任务
PUT
/openapi/v0.9/task/api/v1/workspaces/{proj_uuid}/flight-tasks/{task_uuid}
es-task-service
请求参数
Path 参数
proj_uuid
string
必需
task_uuid
string
任务UUID
示例值:
"1234567890"
Header 参数
x-user-token
string
必需
默认值:
{{x-user-token}}
X-Request-Id
string
可选
默认值:
{% mock 'uuid' %}
Body 参数application/json
begin_at
integer
必需
min 1
max 1712985600
示例值:
1712985600
business_type
integer
可选
cloud_to_cloud_id
string
云云对接存储桶id
continuous_task_periods
array [array]
必需
min 1
max 48
unique
>= 1 items<= 48 items
integer
可选
dom
array[integer]
必需
min 1
max 31
unique
>= 1 items<= 31 items
示例值:
[[1,2,3]]
dow
array[integer]
必需
min 1
max 7
unique
>= 1 items<= 7 items
示例值:
[[1,2,3]]
end_at
integer
必需
min 1
示例值:
1712985600
extended_begin_at
array[integer]
必需
min 1
max 48
unique
>= 1 items<= 48 items
示例值:
[1712985600,1712985600]
interval
integer
必需
min 1
>= 1
示例值:
1
landing_dock_sn
string
降落设备sn
min_battery_capacity
integer
必需
min 50
max 100
>= 50<= 100
示例值:
50
name
string
计划名称
out_of_control_action_in_flight
integer
必需
min 1
max 2
>= 1<= 2
示例值:
1
push_c2c_organization_uuid
string
可选
required: false
repeat_type
integer
必需
enum: 0 1 2 3 4 5 6 7 8
0-不重复, 1-每几秒, 2-每几分钟, 3-每几小时, 4-每几天, 5-每几周, 6-每几月(按日期), 7-每几月(按星期), 8-绝对每年
<= 8
示例值:
1
resumable_status
enum<string>
续飞状态
枚举值:
automanual
示例值:
auto
rth_altitude
number
必需
min 15
max 1500
>= 15<= 1500
示例值:
15
rth_mode
integer
必需
min 0
max 1
>= 0<= 1
示例值:
0
sn
string
起飞设备sn
示例值:
SN123456
subscription_alert_cloud_to_cloud_frequency
integer
云云对接告警频率
subscription_alert_email_frequency
integer
邮件告警频率
subscription_alert_phone_frequency
integer
短信告警频率
subscription_alert_user_web_frequency
integer
用户站内订阅频率
subscription_receive_type
array[string]
可选
示例值:
["email","phone","user_web","cloud_to_cloud"]
subscription_user_id
array[string]
订阅用户ID列表
tags
array[string]
必需
min 0
max 10
unique
<= 10 items
示例值:
["tag1","tag2"]
task_type
integer
必需
enum: 1 2 3 5
-1 表示立即任务
-2 表示重复任务
-3 表示单次定时任务
-5 表示连续任务
>= 1<= 5
示例值:
1
time_zone
string
时区
示例值:
Asia/Chongqing
wayline_duration
number
必需
min 1
>= 1
示例值:
1712985600
wayline_precision_type
integer
必需
min 0
max 1
>= 0<= 1
示例值:
0
wayline_uuid
string
航线uuid
wom
integer
一个月中的第几周
>= 1<= 4
示例值:
1
示例
{
"begin_at": 1712985600,
"business_type": 0,
"cloud_to_cloud_id": "string",
"continuous_task_periods": [
[
0
]
],
"dom": [
[
1,
2,
3
]
],
"dow": [
[
1,
2,
3
]
],
"end_at": 1712985600,
"extended_begin_at": [
1712985600,
1712985600
],
"interval": 1,
"landing_dock_sn": "string",
"min_battery_capacity": 50,
"name": "string",
"out_of_control_action_in_flight": 1,
"push_c2c_organization_uuid": "string",
"repeat_type": 1,
"resumable_status": "auto",
"rth_altitude": 15,
"rth_mode": 0,
"sn": "SN123456",
"subscription_alert_cloud_to_cloud_frequency": 0,
"subscription_alert_email_frequency": 0,
"subscription_alert_phone_frequency": 0,
"subscription_alert_user_web_frequency": 0,
"subscription_receive_type": [
"email",
"phone",
"user_web",
"cloud_to_cloud"
],
"subscription_user_id": [
"string"
],
"tags": [
"tag1",
"tag2"
],
"task_type": 1,
"time_zone": "Asia/Chongqing",
"wayline_duration": 1712985600,
"wayline_precision_type": 0,
"wayline_uuid": "string",
"wom": 1
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT '/openapi/v0.9/task/api/v1/workspaces//flight-tasks/"1234567890"' \
--header 'x-user-token;' \
--header 'X-Request-Id: {% mock '\''uuid'\'' %}' \
--header 'Content-Type: application/json' \
--data-raw '{
"begin_at": 1712985600,
"business_type": 0,
"cloud_to_cloud_id": "string",
"continuous_task_periods": [
[
0
]
],
"dom": [
[
1,
2,
3
]
],
"dow": [
[
1,
2,
3
]
],
"end_at": 1712985600,
"extended_begin_at": [
1712985600,
1712985600
],
"interval": 1,
"landing_dock_sn": "string",
"min_battery_capacity": 50,
"name": "string",
"out_of_control_action_in_flight": 1,
"push_c2c_organization_uuid": "string",
"repeat_type": 1,
"resumable_status": "auto",
"rth_altitude": 15,
"rth_mode": 0,
"sn": "SN123456",
"subscription_alert_cloud_to_cloud_frequency": 0,
"subscription_alert_email_frequency": 0,
"subscription_alert_phone_frequency": 0,
"subscription_alert_user_web_frequency": 0,
"subscription_receive_type": [
"email",
"phone",
"user_web",
"cloud_to_cloud"
],
"subscription_user_id": [
"string"
],
"tags": [
"tag1",
"tag2"
],
"task_type": 1,
"time_zone": "Asia/Chongqing",
"wayline_duration": 1712985600,
"wayline_precision_type": 0,
"wayline_uuid": "string",
"wom": 1
}'
返回响应
🟢200成功
application/json
Body
HTTP响应模板
code
integer
响应码
message
string
响应消息
data
object
resp.CreateTaskResp
task
object
任务信息
示例
{
"code": 0,
"message": "string",
"data": {
"task": {
"begin_at": [
1712985600
],
"uuid": [
"1234567890"
],
"wayline_validity_check_codes": [
1,
2,
3
]
}
}
}
修改于 2025-06-27 08:51:03