dji-cloud-api
  1. 航线生成控制器
dji-cloud-api
  • WaylineJobController
    • Create a wayline task for the Dock.
      POST
    • Paginate through all jobs in this workspace.
      GET
    • Send the command to cancel the jobs.
      DELETE
    • Set the media files for this job to upload immediately.
      POST
    • updateJobStatus
      PUT
  • WaylineFileController
    • get wayline list
      GET
    • get wayline file download address
      GET
    • get wayline file download address
      GET
    • get duplicated wayline name
      GET
    • file upload result report
      POST
    • batch favorites wayline
      POST
    • batch unfavorites wayline
      DELETE
    • Delete the wayline file in the workspace according to the wayline id.
      DELETE
    • Import kmz wayline files.
      POST
  • StorageController
    • Get STS Token
      POST
  • DRC(直接遥控)控制器类。
    • 建立DRC连接。
      POST
    • 进入DRC模式。
      POST
    • 退出DRC模式。
      POST
  • 机场(Dock)控制器类。
    • 创建远程调试任务。
      POST
    • 飞向指定点位。
      POST
    • 停止飞向点位任务。
      DELETE
    • 从指定点位起飞。
      POST
    • 夺取飞行控制权限。
      POST
    • 夺取负载设备控制权限。
      POST
    • 发送负载设备命令。
      POST
    • 关闭舱盖
      PUT
    • coverForceClose
      PUT
    • coverOpen
      PUT
    • debugModeOpen
      PUT
  • UserController
    • Query the information of the current user.
    • Paging to query all users in a workspace.
    • Modify user information. Only mqtt account information is included, nothing else can be modified.
  • LoginController
    • login
    • refreshToken
  • DeviceController
    • 在一个工作区中获取所有在线设备的拓扑列表。
    • 将设备绑定到工作空间后,设备数据只能在 Web 上看到。
    • 根据设备 sn 获取设备信息。
    • 在一个工作区中获取绑定设备列表。
    • 移除设备的绑定状态。
    • 更新设备信息。
    • 提供离线固件升级任务。
    • 设置无人机的属性参数。
    • 获取当前工作空间下设备类型数量。
    • 获取所有工作空间下设备类型数量。
    • 查询每个 domain 下设备总数与在线数
  • TopologyController
    • obtain device topology list
  • DeviceHmsController
    • Page to query the hms information of the device.
    • Update unread hms messages to read status.
    • Get hms messages for a single device.
  • WorkspaceController
    • Gets information about the workspace that the current user is in.
  • DeviceLogsController
    • Obtain the device upload log list by paging according to the query parameters.
    • Get a list of log files that can be uploaded in real time.
    • Initiate a log upload request to the gateway.
    • Cancel logs file upload.
    • Delete upload history.
    • Query the download address of the file according to the wayline file id,
  • LiveStreamController
    • 获取当前直播流容量信息。
    • 获取当前直播流容量信息。
    • 查询全部能进行直播的设备
    • 根据设备sn查询设备直播信息
    • 根据设备sn查询设备直播信息
    • Live streaming according to the parameters passed in from the web side.
    • Stop live streaming according to the parameters passed in from the web side.
    • Set the quality of the live streaming according to the parameters passed in from the web side.
    • liveLensChange
  • DeviceFirmwareController
    • Get the latest firmware version information for this device model.
    • Query firmware information based on parameters.
    • Import firmware file for device upgrades.
    • Change the firmware availability status.
  • FileController
    • Get information about all the media files in this workspace based on the workspace id.
    • Query the download address of the file according to the media file id,
  • MediaController
    • media fast upload
    • app reports file upload result
    • checks whether the file fingerprint exists
    • callback after the file group upload complete
  • DeviceDataController
    • getDeviceFlightAreaStatus
  • FlightAreaController
    • getFlightAreas
    • createFlightArea
    • deleteFlightArea
    • updateFlightArea
    • syncFlightArea
  • WorkspaceElementController
    • get map elements
    • create map element
    • update map element
    • delete map element
    • Delete all the element information in this group based on the group id.
  • 航线生成控制器
    • 生成航线
      POST
    • KMZ文件转JSON
      POST
    • 云端KMZ文件转JSON
      GET
  • WeatherController
    • 根据区域编码获取天气信息
    • 通过经纬度查询天气
  1. 航线生成控制器

生成航线

POST
/wayline/api/v1/generate/{fileName}

请求参数

Path 参数
fileName
string 
必需
文件名,用于指定生成的航线文件名称
Header 参数
x-auth-token
string 
可选
默认值:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ3b3Jrc3BhY2VfaWQiOiJlM2RlYTBmNS0zN2YyLTRkNzktYWU1OC00OTBhZjMyMjgwNjkiLCJzdWIiOiJDbG91ZEFwaVNhbXBsZSIsInVzZXJfdHlwZSI6IjEiLCJuYmYiOjE3NDkwODYzMDEsImxvZyI6IkxvZ2dlcltjb20uZGppLnNhbXBsZS5jb21tb24ubW9kZWwuQ3VzdG9tQ2xhaW1dIiwiaXNzIjoiREpJIiwiaWQiOiJhMTU1OWU3Yy04ZGQ4LTQ3ODAtYjk1Mi0xMDBjYzQ3OTdkYTIiLCJleHAiOjE4MzU0ODYzMDEsImlhdCI6MTc0OTA4NjMwMSwidXNlcm5hbWUiOiJhZG1pblBDIn0.W5x4fh7PWALqknARx8aoGQhK8ci5t6U7mITN1Gbn4H0
Body 参数application/json
航线生成请求对象,包含生成航线所需的信息
templateType
string 
航线类型
可选
默认值:
waypoint
正则匹配:
^(waypoint)$
droneType
integer 
无人机类型
必需
subDroneType
integer 
无人机子类型
必需
payloadType
integer 
负载类型
必需
payloadPosition
integer 
负载挂载位置
必需
imageFormat
string 
负载图片存储类型
可选
正则匹配:
^(wide|zoom|ir|narrow_band|visable)(,(wide|zoom|ir|narrow_band|visable))*$
finishAction
string 
航线结束动作
可选
默认值:
goHome
正则匹配:
^(goHome|noAction|autoLand|gotoFirstWaypoint)$
exitOnRcLostAction
string 
失控动作
可选
默认值:
goBack
正则匹配:
^(goBack|landing|hover)$
globalHeight
number 
全局航线高度
可选
默认值:
80
autoFlightSpeed
number 
全局航线飞行速度
可选
>= 1<= 15
默认值:
10
waypointHeadingReq
object (WaypointHeadingReq) 
全局偏航角模式
可选
waypointHeadingMode
string 
偏航角模式
可选
默认值:
followWayline
正则匹配:
^(followWayline|manually|fixed|smoothTransition|towardPOI)$
waypointHeadingAngle
number 
偏航角度
可选
>= -180<= 180
waypointPoiPoint
string 
兴趣点
可选
waypointTurnReq
object (WaypointTurnReq) 
全局航点转弯模式
可选
waypointTurnMode
string 
航点转弯模式
必需
默认值:
toPointAndStopWithDiscontinuityCurvature
正则匹配:
^(coordinateTurn|toPointAndStopWithDiscontinuityCurvature|toPointAndStopWithContinuityCurvature|toPointAndPassWithContinuityCurvature)$
waypointTurnDampingDist
number 
航点转弯截距
可选
> 0
useStraightLine
integer 
该航段是否贴合直线
可选
>= 0<= 1
gimbalPitchMode
string 
云台俯仰角控制模式
可选
正则匹配:
^(manual|usePointSetting)?$
takeOffRefPoint
string 
参考起飞点
必需
routePointList
array[object (RoutePointReq) {13}] 
航点列表
可选
routePointIndex
integer 
航点编号
必需
longitude
number 
经度
必需
>= -180<= 180
latitude
number 
纬度
必需
>= -90<= 90
height
number 
高度
可选
speed
number 
飞行速度
可选
waypointHeading
object (WaypointHeadingReq) 
航点偏航角
可选
waypointTurnMode
object (WaypointTurnReq) 
航点转弯模式
可选
gimbalPitchAngle
number 
航点云台俯仰角
可选
>= -90<= 60
actions
array[object (PointActionReq) {11}] 
航点动作列表
可选
actionTrigger
object (ActionTriggerReq) 
航点动作触发
可选
timeInterval
number 
可选
等时拍照间隔时间 单位s
> 0
distanceInterval
number 
可选
等距拍照间隔距离 单位m
> 0
endIntervalRouteIndex
integer 
可选
停止间隔拍照航点编号
mappingTypeReq
object (MappingTypeReq) 
可选
建图航拍、倾斜摄影、航带飞行模板参数
collectionMethod
string 
采集方式
可选
lensType
string 
镜头类型
可选
overlapH
integer 
航向重叠率
可选
overlapW
integer 
旁向重叠率
可选
elevationOptimizeEnable
integer 
是否开启高程优化
可选
shootType
string 
拍照模式
可选
direction
string 
航线方向
可选
margin
string 
测区外扩距离
可选
coordinates
array[object (CoordinatePointReq) {3}] 
可选
测区多边形坐标 经度,纬度,高度
示例
{
    "templateType": "waypoint",
    "droneType": 0,
    "subDroneType": 0,
    "payloadType": 0,
    "payloadPosition": 0,
    "imageFormat": "string",
    "finishAction": "goHome",
    "exitOnRcLostAction": "goBack",
    "globalHeight": 80,
    "autoFlightSpeed": 10,
    "waypointHeadingReq": {
        "waypointHeadingMode": "followWayline",
        "waypointHeadingAngle": -180,
        "waypointPoiPoint": "string"
    },
    "waypointTurnReq": {
        "waypointTurnMode": "toPointAndStopWithDiscontinuityCurvature",
        "waypointTurnDampingDist": 1,
        "useStraightLine": 0
    },
    "gimbalPitchMode": "string",
    "takeOffRefPoint": "string",
    "routePointList": [
        {
            "routePointIndex": 0,
            "longitude": -180,
            "latitude": -90,
            "height": 0,
            "speed": 0,
            "waypointHeading": {
                "waypointHeadingMode": "followWayline",
                "waypointHeadingAngle": -180,
                "waypointPoiPoint": "string"
            },
            "waypointTurnMode": {
                "waypointTurnMode": "toPointAndStopWithDiscontinuityCurvature",
                "waypointTurnDampingDist": 1,
                "useStraightLine": 0
            },
            "gimbalPitchAngle": -90,
            "actions": [
                {
                    "actionIndex": 0,
                    "hoverTime": 1,
                    "aircraftHeading": -180,
                    "useGlobalImageFormat": 0,
                    "imageFormat": "string",
                    "takePhotoType": 0,
                    "gimbalYawRotateAngle": -180,
                    "gimbalPitchRotateAngle": -90,
                    "zoom": 1,
                    "startRecord": true,
                    "stopRecord": true
                }
            ],
            "actionTrigger": {
                "actionTriggerType": "string",
                "actionTriggerParam": 1
            },
            "timeInterval": 1,
            "distanceInterval": 1,
            "endIntervalRouteIndex": 0
        }
    ],
    "mappingTypeReq": {
        "collectionMethod": "string",
        "lensType": "string",
        "overlapH": 0,
        "overlapW": 0,
        "elevationOptimizeEnable": 0,
        "shootType": "string",
        "direction": "string",
        "margin": "string",
        "coordinates": [
            {
                "longitude": 0,
                "latitude": 0,
                "height": 0
            }
        ]
    }
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/wayline/api/v1/generate/' \
--header 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ3b3Jrc3BhY2VfaWQiOiJlM2RlYTBmNS0zN2YyLTRkNzktYWU1OC00OTBhZjMyMjgwNjkiLCJzdWIiOiJDbG91ZEFwaVNhbXBsZSIsInVzZXJfdHlwZSI6IjEiLCJuYmYiOjE3NDkwODYzMDEsImxvZyI6IkxvZ2dlcltjb20uZGppLnNhbXBsZS5jb21tb24ubW9kZWwuQ3VzdG9tQ2xhaW1dIiwiaXNzIjoiREpJIiwiaWQiOiJhMTU1OWU3Yy04ZGQ4LTQ3ODAtYjk1Mi0xMDBjYzQ3OTdkYTIiLCJleHAiOjE4MzU0ODYzMDEsImlhdCI6MTc0OTA4NjMwMSwidXNlcm5hbWUiOiJhZG1pblBDIn0.W5x4fh7PWALqknARx8aoGQhK8ci5t6U7mITN1Gbn4H0' \
--header 'Content-Type: application/json' \
--data-raw '{
    "templateType": "waypoint",
    "droneType": 0,
    "subDroneType": 0,
    "payloadType": 0,
    "payloadPosition": 0,
    "imageFormat": "string",
    "finishAction": "goHome",
    "exitOnRcLostAction": "goBack",
    "globalHeight": 80,
    "autoFlightSpeed": 10,
    "waypointHeadingReq": {
        "waypointHeadingMode": "followWayline",
        "waypointHeadingAngle": -180,
        "waypointPoiPoint": "string"
    },
    "waypointTurnReq": {
        "waypointTurnMode": "toPointAndStopWithDiscontinuityCurvature",
        "waypointTurnDampingDist": 1,
        "useStraightLine": 0
    },
    "gimbalPitchMode": "string",
    "takeOffRefPoint": "string",
    "routePointList": [
        {
            "routePointIndex": 0,
            "longitude": -180,
            "latitude": -90,
            "height": 0,
            "speed": 0,
            "waypointHeading": {
                "waypointHeadingMode": "followWayline",
                "waypointHeadingAngle": -180,
                "waypointPoiPoint": "string"
            },
            "waypointTurnMode": {
                "waypointTurnMode": "toPointAndStopWithDiscontinuityCurvature",
                "waypointTurnDampingDist": 1,
                "useStraightLine": 0
            },
            "gimbalPitchAngle": -90,
            "actions": [
                {
                    "actionIndex": 0,
                    "hoverTime": 1,
                    "aircraftHeading": -180,
                    "useGlobalImageFormat": 0,
                    "imageFormat": "string",
                    "takePhotoType": 0,
                    "gimbalYawRotateAngle": -180,
                    "gimbalPitchRotateAngle": -90,
                    "zoom": 1,
                    "startRecord": true,
                    "stopRecord": true
                }
            ],
            "actionTrigger": {
                "actionTriggerType": "string",
                "actionTriggerParam": 1
            },
            "timeInterval": 1,
            "distanceInterval": 1,
            "endIntervalRouteIndex": 0
        }
    ],
    "mappingTypeReq": {
        "collectionMethod": "string",
        "lensType": "string",
        "overlapH": 0,
        "overlapW": 0,
        "elevationOptimizeEnable": 0,
        "shootType": "string",
        "direction": "string",
        "margin": "string",
        "coordinates": [
            {
                "longitude": 0,
                "latitude": 0,
                "height": 0
            }
        ]
    }
}'

返回响应

🟢200成功
application/json
Body
HttpResultResponse 表示航线生成结果的HTTP响应对象
code
integer 
可选
0 means success, non-zero means error.
示例值:
0
message
string 
可选
The response message.
示例值:
success
data
object (Object) 
可选
The response data.
示例
{
  "code": 0,
  "message": "生成航线失败:",
  "data": {}
}
修改于 2025-06-05 01:52:34
上一页
Delete all the element information in this group based on the group id.
下一页
KMZ文件转JSON
Built with