任务操作命令下发
POST
/openapi/v0.9/task/api/v1/workspaces/{proj_uuid}/flight-tasks/{task_uuid}/cmds
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
device_cmd_data
string
可选
具体可看[发送飞行控制指令]的示例。
example: {"param1": "value1"}
device_cmd_method
enum<string>
可选
example: camera_photo_take
enum:
flighttask_pause, flighttask_recovery, return_home, return_specific_home, return_home_cancel, flight_setup_abort
枚举值:
flighttask_pauseflighttask_recoveryreturn_homereturn_specific_homereturn_home_cancelflight_setup_abortcamera_look_at
task_uuid
string
任务UUID
示例
{
"device_cmd_method": "flighttask_pause",
"device_sn": "7CTDM2100B40V7",
"task_uuid": "a3f4da4a-6699-4a14-b69c-c43e516b2c76"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/openapi/v0.9/task/api/v1/workspaces//flight-tasks/"1234567890"/cmds' \
--header 'x-user-token;' \
--header 'X-Request-Id: {% mock '\''uuid'\'' %}' \
--header 'Content-Type: application/json' \
--data-raw '{
"device_cmd_method": "flighttask_pause",
"device_sn": "7CTDM2100B40V7",
"task_uuid": "a3f4da4a-6699-4a14-b69c-c43e516b2c76"
}'
返回响应
🟢200成功
application/json
Body
object | null
HTTP响应模板
code
integer
响应码
message
string
响应消息
data
object | null
响应数据
示例
{
"code": 0,
"message": "string",
"data": {}
}
修改于 2025-06-27 08:51:03