NEW FlightHub 2 OpenAPI V1.0
  1. Device 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
        GET
      • HMS Information Retrieval
        GET
      • Real-time control command distribution
        POST
      • Dock camera switch
        POST
      • Aircraft Lens Switching
        POST
      • Control acquisition
        POST
      • Release control
        DELETE
      • Video transmission clarity settings
        PUT
      • Custom Network RTK Calibration
        POST
    • 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
      • Updated flight task status
      • Obtain flight task list
      • Obtain media resources generated by the Flight task
      • Obtain Flight task trajectory information
      • Obtain Flight task information
    • 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. Device Management

Control acquisition

Developing
POST
/openapi/v0.1/device/control
If you need to operate the payload for a specific aircraft device, you must first obtain control of the payload device, and then operate on this payload. For example, switching the lens of a payload camera on the aircraft.
: : :tip[]
payload_index parameter can be passed through data.list.drone.camera_list.camera_index in the device list.
: : :

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
drone_sn
string 
required
Aircraft SN
payload_index
array[string]
required
The index of the payload, this parameter can be passed through data.list.drone.camera_list.camera_index in the device list.
Example
{
  "drone_sn": "1581F6Q8D242100CPWEK",
  "payload_index": [
    "81-0-0"
  ]
}

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/device/control' \
--header 'X-Request-Id;' \
--header 'X-Language: zh' \
--header 'X-Project-Uuid: {{X-Project-Uuid}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "drone_sn": "1581F6Q8D242100CPWEK",
    "payload_index": [
        "81-0-0"
    ]
}'

Responses

🟢200Success
application/json
Body
code
integer 
required
Non-zero indicates an exception
message
string 
required
Message prompt
data
object 
required
drone_sn
string 
required
Aircraft SN
controls
array [object {4}] 
required
Control Information
Example
{
  "code": 0,
  "message": "OK",
  "data": {
    "drone_sn": "1581F6Q8D242100CPWEK",
    "controls": [
      {
        "type": "flight",
        "gateway": {
          "sn": "7CTDM3D00BZNVZ"
        },
        "user": {
          "call_sign": "",
          "user_id": "",
          "type": ""
        }
      },
      {
        "type": "payload",
        "payload_index": "81-0-0",
        "gateway": {
          "sn": ""
        },
        "user": {
          "call_sign": "",
          "user_id": "",
          "type": ""
        }
      },
      {
        "type": "payload",
        "payload_index": "80-0-0",
        "gateway": {
          "sn": "7CTDM3D00BZNVZ"
        },
        "user": {
          "call_sign": "admin",
          "user_id": "1721316169796849371",
          "type": "cloud"
        }
      }
    ]
  }
}
Previous
Aircraft Lens Switching
Next
Release control
Built with