NEW FlightHub 2 OpenAPI V1.0
  1. Bypass Streaming
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
      • HMS Information Retrieval
      • Real-time control command distribution
      • Dock camera switch
      • Aircraft Lens Switching
      • Control acquisition
      • Release control
      • Video transmission clarity settings
      • Custom Network RTK Calibration
    • Livestream Management
      • Livestream Management Tutorial
      • Livestream Push
        • Start livestream
      • Bypass Streaming
        • Stream forwarding error code
        • Create Stream Forwarder
          POST
        • Enable/Disable stream forwarder
          PUT
        • Get stream transcoder list
          GET
        • Delete stream forwarder
          DELETE
    • 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. Bypass Streaming

Create Stream Forwarder

Developing
POST
/openapi/v0.1/live-stream/converter
Create a stream forwarder. Calling this interface will create and store a stream forwarder on FlightHub 2. You can call Get Stream Forwarder List to retrieve the created stream forwarders, and then call Enable/Disable Stream Forwarder to activate the stream forwarding function.
You can create up to 20 stream forwarders.

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
converter_name
string 
required
Name of the running converter. This name must be unique, and the three parameters sn/camera_index/rtmp_url cannot be the same as those of an already created and active converter.
sn
string 
required
SN of the stream source device, such as dock SN or aircraft SN.
camera_index
string 
required
Camera index. This parameter can be passed through data.list.drone.camera_list.camera_index in the device list.
schema
string 
required
Parameter
schema_option
required
Parameter Options
Any of
url
string 
RTMP Server Address
optional
When the schema is RTMP, the url (streaming address) is required
Example
{
  "converter_name": "my_converter",
  "sn": "4SEDL9F0011RY2",
  "camera_index": "165-0-7",
  "schema": "rtmp",
  "schema_option": {
    "url": "rtmp://live.restream.io/live/re_7734128_5da13a862901ce2d4084"
  }
}

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/live-stream/converter' \
--header 'X-Request-Id;' \
--header 'X-Language: zh' \
--header 'X-Project-Uuid: {{X-Project-Uuid}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "converter_name": "my_converter",
    "sn": "4SEDL9F0011RY2",
    "camera_index": "165-0-7",
    "schema": "rtmp",
    "schema_option": {
        "url": "rtmp://live.restream.io/live/re_7734128_5da13a862901ce2d4084"
    }
}'

Responses

🟢200Success
application/json
Body
code
integer 
required
Non-zero indicates an exception
message
string 
required
Message Notification
data
object 
required
converter_id
string 
required
Converter ID, the unique identifier of the converter.
Example
{
  "code": 0,
  "message": "",
  "data": {
    "converter_id": "acfb0e79-87a7-4d61-898e-2f32792996e5"
  }
}
Previous
Stream forwarding error code
Next
Enable/Disable stream forwarder
Built with