### Get Configuration Source: https://context7.com/sb-im/docs/llms.txt Retrieve system configuration including NTP server and app credentials for device initialization. ```APIDOC ## Get Configuration (config) ### Description Retrieve system configuration including NTP server and app credentials for device initialization. ### Method POST ### Endpoint `thing/product/{gateway_sn}/requests` ### Parameters #### Query Parameters None #### Request Body - **bid** (string) - Required - Unique identifier for the request. - **data** (object) - Required - Contains configuration request details. - **config_scope** (string) - Required - Scope of the configuration (e.g., `product`). - **config_type** (string) - Required - Type of configuration requested (e.g., `json`). - **gateway** (string) - Required - Serial number of the gateway device. - **tid** (string) - Required - Transaction ID. - **timestamp** (integer) - Required - Timestamp of the request. - **method** (string) - Required - The method name, should be `config`. ### Request Example ```json { "bid": "42a19f36-5117-4520-bd13-fd61d818d52e", "data": { "config_scope": "product", "config_type": "json" }, "gateway": "dock-sn", "tid": "6a7bfe89-c386-4043-b600-b518e10096cc", "timestamp": 1667803298000, "method": "config" } ``` ### Response #### Success Response (200) - **bid** (string) - Unique identifier for the response. - **data** (object) - Contains the system configuration. - **ntp_server_host** (string) - NTP server hostname. - **ntp_server_port** (integer) - NTP server port. - **app_id** (string) - Application ID. - **app_key** (string) - Application key. - **app_license** (string) - Application license. - **gateway** (string) - Serial number of the gateway device. - **tid** (string) - Transaction ID. - **timestamp** (integer) - Timestamp of the response. - **method** (string) - The method name, should be `config`. #### Response Example ```json { "bid": "42a19f36-5117-4520-bd13-fd61d818d52e", "data": { "ntp_server_host": "ntp.example.com", "ntp_server_port": 123, "app_id": "123456", "app_key": "your_app_key", "app_license": "your_app_license" }, "gateway": "dock-sn", "tid": "6a7bfe89-c386-4043-b600-b518e10096cc", "timestamp": 1667803298000, "method": "config" } ``` ``` -------------------------------- ### Camera Start Recording API Source: https://context7.com/sb-im/docs/llms.txt Initiates video recording on a specified camera. This endpoint is used to start the recording process on a particular camera payload. ```APIDOC ## POST /sb-im/services ### Description Start video recording on specified camera payload. ### Method POST ### Endpoint `/sb-im/services` ### Parameters #### Query Parameters - **gateway_sn** (string) - Required - The serial number of the gateway. #### Request Body - **bid** (string) - Required - Unique identifier for the request. - **data** (object) - Required - Contains the payload index for the camera. - **payload_index** (string) - Required - The index of the camera payload to control. - **tid** (string) - Required - Transaction identifier. - **timestamp** (integer) - Required - Timestamp of the request in milliseconds. - **method** (string) - Required - The method name, should be `camera_recording_start`. ### Request Example ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "payload_index": "67-0-0" }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "camera_recording_start" } ``` ### Response #### Success Response (200) - **bid** (string) - Unique identifier for the response. - **data** (object) - Contains the result of the operation. - **result** (integer) - 0 indicates success, non-zero indicates failure. - **tid** (string) - Transaction identifier. - **timestamp** (integer) - Timestamp of the response in milliseconds. - **method** (string) - The method name, should be `camera_recording_start`. #### Response Example ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "result": 0 }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "camera_recording_start" } ``` ``` -------------------------------- ### Start Livestream Source: https://context7.com/sb-im/docs/llms.txt Initiate video livestream from drone camera or hangar to cloud platform via RTMP, WebRTC/WHIP, or other protocols. ```APIDOC ## Start Livestream (live_start_push) ### Description Initiate video livestream from drone camera or hangar to cloud platform via RTMP, WebRTC/WHIP, or other protocols. ### Method POST ### Endpoint `thing/product/{gateway_sn}/services` ### Parameters #### Query Parameters None #### Request Body - **bid** (string) - Required - Unique identifier for the request. - **data** (object) - Required - Contains livestreaming parameters. - **url_type** (integer) - Required - Type of URL protocol. Options: 0 (Agora), 1 (RTMP), 3 (GB28181), 4 (WebRTC/WHIP). - **url** (string) - Required - The streaming URL. - **video_id** (string) - Required - Identifier for the video stream. - **video_quality** (integer) - Optional - Desired video quality. Options: 0 (Adaptive), 1 (Smooth), 2 (Standard), 3 (HD), 4 (Ultra HD). - **tid** (string) - Required - Transaction ID. - **timestamp** (integer) - Required - Timestamp of the request. - **method** (string) - Required - The method name, should be `live_start_push`. ### Request Example ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "url_type": 1, "url": "rtmp://streaming.example.com:1935/live/stream_key", "video_id": "1ZNDH1D0010098/39-0-7/normal-0", "video_quality": 3 }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "live_start_push" } ``` ### Response #### Success Response (200) - **bid** (string) - Unique identifier for the response. - **data** (object) - Contains the result of the livestream start operation. - **result** (integer) - Result code, 0 for success. - **tid** (string) - Transaction ID. - **timestamp** (integer) - Timestamp of the response. - **method** (string) - The method name, should be `live_start_push`. #### Response Example ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "result": 0 }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "live_start_push" } ``` ``` -------------------------------- ### Start Camera Recording (JSON) Source: https://context7.com/sb-im/docs/llms.txt Initiates video recording on a specified camera. This service is called from the Cloud to the Device. It requires a payload index and returns a result code. ```JSON { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "payload_index": "67-0-0" }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "camera_recording_start" } ``` -------------------------------- ### Get System Configuration (JSON) Source: https://context7.com/sb-im/docs/llms.txt Retrieves system configuration details necessary for device initialization. This includes NTP server settings and application credentials. The request specifies the scope and type of configuration required. The response provides the NTP server host and port, along with application ID, key, and license. ```JSON { "bid": "42a19f36-5117-4520-bd13-fd61d818d52e", "data": { "config_scope": "product", "config_type": "json" }, "gateway": "dock-sn", "tid": "6a7bfe89-c386-4043-b600-b518e10096cc", "timestamp": 1667803298000, "method": "config" } ``` ```JSON { "bid": "42a19f36-5117-4520-bd13-fd61d818d52e", "data": { "ntp_server_host": "ntp.example.com", "ntp_server_port": 123, "app_id": "123456", "app_key": "your_app_key", "app_license": "your_app_license" }, "gateway": "dock-sn", "tid": "6a7bfe89-c386-4043-b600-b518e10096cc", "timestamp": 1667803298000, "method": "config" } ``` -------------------------------- ### Start Livestream (JSON) Source: https://context7.com/sb-im/docs/llms.txt Initiates a video livestream from a device (e.g., drone camera) to a cloud platform. Supports various protocols like RTMP, WebRTC/WHIP, and GB28181. The request specifies the streaming URL, video ID, and desired quality. The response confirms the initiation of the stream. ```JSON { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "url_type": 1, "url": "rtmp://streaming.example.com:1935/live/stream_key", "video_id": "1ZNDH1D0010098/39-0-7/normal-0", "video_quality": 3 }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "live_start_push" } ``` ```JSON { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "result": 0 }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "live_start_push" } ``` -------------------------------- ### Get Device Bind Status Source: https://context7.com/sb-im/docs/llms.txt Query device organization binding status to determine if devices need to be bound to an organization. ```APIDOC ## Get Device Bind Status (airport_bind_status) ### Description Query device organization binding status to determine if devices need to be bound to an organization. ### Method POST ### Endpoint `thing/product/{gateway_sn}/requests` ### Parameters #### Query Parameters None #### Request Body - **bid** (string) - Required - Unique identifier for the request. - **data** (object) - Required - Contains device information. - **devices** (array) - Required - List of devices to check. - **sn** (string) - Required - Serial number of the device. - **tid** (string) - Required - Transaction ID. - **timestamp** (integer) - Required - Timestamp of the request. - **method** (string) - Required - The method name, should be `airport_bind_status`. ### Request Example ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "devices": [ { "sn": "drone-sn" }, { "sn": "dock-sn" } ] }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "airport_bind_status" } ``` ### Response #### Success Response (200) - **bid** (string) - Unique identifier for the response. - **data** (object) - Contains the binding status results. - **output** (object) - Output details. - **bind_status** (array) - List of binding status for each device. - **sn** (string) - Serial number of the device. - **is_device_bind_organization** (boolean) - Indicates if the device is bound to an organization. - **organization_id** (string) - The ID of the organization the device is bound to. - **organization_name** (string) - The name of the organization. - **device_callsign** (string) - The callsign of the device. - **result** (integer) - Result code, 0 for success. - **tid** (string) - Transaction ID. - **timestamp** (integer) - Timestamp of the response. - **method** (string) - The method name, should be `airport_bind_status`. #### Response Example ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "output": { "bind_status": [ { "sn": "dock-sn", "is_device_bind_organization": true, "organization_id": "org-12345", "organization_name": "StrawBerry Innovation", "device_callsign": "SuperDock-01" }, { "sn": "drone-sn", "is_device_bind_organization": true, "organization_id": "org-12345", "organization_name": "StrawBerry Innovation", "device_callsign": "M3E-Drone" } ] }, "result": 0 }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "airport_bind_status" } ``` ``` -------------------------------- ### Get Device Bind Status (JSON) Source: https://context7.com/sb-im/docs/llms.txt Queries the organization binding status of devices. This helps determine if devices require binding to an organization for cloud management. It takes a list of device serial numbers as input and returns their binding status, organization details, and callsigns. ```JSON { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "devices": [ { "sn": "drone-sn" }, { "sn": "dock-sn" } ] }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "airport_bind_status" } ``` ```JSON { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "output": { "bind_status": [ { "sn": "dock-sn", "is_device_bind_organization": true, "organization_id": "org-12345", "organization_name": "StrawBerry Innovation", "device_callsign": "SuperDock-01" }, { "sn": "drone-sn", "is_device_bind_organization": true, "organization_id": "org-12345", "organization_name": "StrawBerry Innovation", "device_callsign": "M3E-Drone" } ] }, "result": 0 }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "airport_bind_status" } ``` -------------------------------- ### Cancel Flight Task (POST /services) Source: https://context7.com/sb-im/docs/llms.txt Cancel one or more prepared flight tasks that haven't started execution yet. This is a Cloud to Device command. ```APIDOC ## POST /services ### Description Cancel one or more prepared flight tasks that haven't started execution yet. ### Method POST ### Endpoint `thing/product/{gateway_sn}/services` ### Parameters #### Request Body - **bid** (string) - Required - Unique identifier for the request. - **data** (object) - Required - Contains the flight task IDs to cancel. - **flight_ids** (array of strings) - Required - List of flight task IDs to cancel. - **tid** (string) - Required - Transaction ID for the request. - **timestamp** (integer) - Required - Timestamp of the request. - **method** (string) - Required - Must be `flighttask_undo`. ### Request Example ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "flight_ids": [ "mission-uuid-001", "mission-uuid-002" ] }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1234567890123, "method": "flighttask_undo" } ``` ### Response #### Success Response (200) - **bid** (string) - Unique identifier for the response. - **data** (object) - Contains the result of the operation. - **result** (integer) - 0 indicates success. - **tid** (string) - Transaction ID for the response. - **timestamp** (integer) - Timestamp of the response. - **method** (string) - Should be `flighttask_undo`. #### Response Example ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "result": 0 }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1234567890123, "method": "flighttask_undo" } ``` ``` -------------------------------- ### Prepare Flight Task (flighttask_prepare) Source: https://context7.com/sb-im/docs/llms.txt Pre-deploys a wayline mission to the hangar and drone with mission parameters. Supports immediate, scheduled, and conditional task types. ```APIDOC ## POST /sb-im/docs ### Description Pre-deploy wayline mission to hangar and drone with mission parameters, supporting immediate, scheduled, and conditional task types. ### Method POST ### Endpoint /sb-im/docs ### Parameters #### Request Body - **bid** (string) - Required - Unique identifier for the request. - **data** (object) - Required - Contains the flight task details. - **flight_id** (string) - Required - Unique identifier for the flight task. - **task_type** (integer) - Required - Type of task: 0 = Immediate, 1 = Scheduled, 2 = Conditional. - **execute_time** (integer) - Optional - Execution time for scheduled tasks in milliseconds. - **file** (object) - Required - Information about the mission file. - **url** (string) - Required - URL of the mission file (e.g., KMZ). - **fingerprint** (string) - Required - MD5 hash of the mission file. - **rth_altitude** (integer) - Optional - Return-to-home altitude in meters. - **rth_mode** (integer) - Optional - Return-to-home mode. - **out_of_control_action** (integer) - Optional - Action to take when control is lost. - **exit_wayline_when_rc_lost** (integer) - Optional - Whether to exit wayline when RC is lost. - **wayline_precision_type** (integer) - Optional - Wayline precision type: 0 = GPS, 1 = High-precision RTK. - **ready_conditions** (object) - Optional - Conditions that must be met before the task can start. - **battery_capacity** (integer) - Required if ready_conditions is present - Minimum battery capacity percentage. - **begin_time** (integer) - Optional if ready_conditions is present - Earliest start time in milliseconds. - **end_time** (integer) - Optional if ready_conditions is present - Latest start time in milliseconds. - **executable_conditions** (object) - Optional - Conditions that must be met for the task to be executable. - **storage_capacity** (integer) - Required if executable_conditions is present - Minimum available storage capacity in MB. - **break_point** (object) - Optional - Resumption point for a broken mission. - **index** (integer) - Required if break_point is present - Index of the waypoint to resume from. - **state** (integer) - Optional if break_point is present - State of the resumed waypoint. - **progress** (number) - Optional if break_point is present - Progress percentage at the breakpoint. - **wayline_id** (integer) - Optional if break_point is present - ID of the wayline segment. - **simulate_mission** (object) - Optional - Settings for mission simulation. - **is_enable** (integer) - Required if simulate_mission is present - Enable simulation (0 = disabled, 1 = enabled). - **flight_safety_advance_check** (integer) - Optional - Enable advanced flight safety checks. - **tid** (string) - Required - Unique identifier for the target device. - **timestamp** (integer) - Required - Timestamp of the request in milliseconds. - **method** (string) - Required - The method name, should be "flighttask_prepare". ### Request Example ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "flight_id": "mission-uuid-001", "task_type": 1, "execute_time": 1734567890123, "file": { "url": "https://storage.example.com/waylines/mission.kmz", "fingerprint": "md5hash123456789" }, "rth_altitude": 100, "rth_mode": 1, "out_of_control_action": 0, "exit_wayline_when_rc_lost": 0, "wayline_precision_type": 1, "ready_conditions": { "battery_capacity": 90, "begin_time": 1734560000000, "end_time": 1734580000000 }, "executable_conditions": { "storage_capacity": 1000 }, "break_point": { "index": 5, "state": 0, "progress": 0.45, "wayline_id": 0 }, "simulate_mission": { "is_enable": 0 }, "flight_safety_advance_check": 1 }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1234567890123, "method": "flighttask_prepare" } ``` ### Response #### Success Response (200) - **bid** (string) - Unique identifier for the response. - **data** (object) - Contains the result of the operation. - **result** (integer) - 0 indicates success, non-zero indicates failure. - **tid** (string) - Unique identifier for the target device. - **timestamp** (integer) - Timestamp of the response in milliseconds. - **method** (string) - The method name, should be "flighttask_prepare". #### Response Example ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "result": 0 }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1234567890123, "method": "flighttask_prepare" } ``` ``` -------------------------------- ### Cancel Flight Task (flighttask_undo) Source: https://context7.com/sb-im/docs/llms.txt Cancels one or more flight tasks that have been prepared but not yet started. This operation is initiated from the cloud to the device and requires a list of flight IDs to be canceled. ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "flight_ids": [ "mission-uuid-001", "mission-uuid-002" ] }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1234567890123, "method": "flighttask_undo" } ``` -------------------------------- ### Initiate Automated Takeoff (takeoff_to_point) Source: https://context7.com/sb-im/docs/llms.txt Commands the drone to perform an automated takeoff from its hangar and fly to a specified target point. Configurable parameters include target coordinates, heights, return-to-home altitude, lost action modes, and flight modes. A response indicates the success or failure of the takeoff initiation. ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "flight_id": "takeoff-mission-001", "target_latitude": 22.907809, "target_longitude": 113.703482, "target_height": 100, "security_takeoff_height": 50, "rth_altitude": 80, "rth_mode": 1, "rc_lost_action": 2, "commander_mode_lost_action": 1, "commander_flight_mode": 1, "commander_flight_height": 60, "max_speed": 12, "simulate_mission": { "is_enable": 0 }, "flight_safety_advance_check": 1 }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "takeoff_to_point" } ``` -------------------------------- ### Prepare Flight Task (flighttask_prepare) Source: https://context7.com/sb-im/docs/llms.txt Pre-deploys a wayline mission to the drone and hangar, supporting immediate, scheduled, and conditional task types. This function allows for detailed configuration of flight parameters, including execution time, file URLs, safety settings, and breakpoint resume capabilities. The request requires a flight ID and mission details, with the response confirming the preparation status. ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "flight_id": "mission-uuid-001", "task_type": 1, "execute_time": 1734567890123, "file": { "url": "https://storage.example.com/waylines/mission.kmz", "fingerprint": "md5hash123456789" }, "rth_altitude": 100, "rth_mode": 1, "out_of_control_action": 0, "exit_wayline_when_rc_lost": 0, "wayline_precision_type": 1, "ready_conditions": { "battery_capacity": 90, "begin_time": 1734560000000, "end_time": 1734580000000 }, "executable_conditions": { "storage_capacity": 1000 }, "break_point": { "index": 5, "state": 0, "progress": 0.45, "wayline_id": 0 }, "simulate_mission": { "is_enable": 0 }, "flight_safety_advance_check": 1 }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1234567890123, "method": "flighttask_prepare" } ``` -------------------------------- ### Return to Home (POST /services) Source: https://context7.com/sb-im/docs/llms.txt Command the drone to return to its home point (hangar location). This is a Cloud to Device command. ```APIDOC ## POST /services ### Description Command the drone to return to its home point (hangar location). ### Method POST ### Endpoint `thing/product/{gateway_sn}/services` ### Parameters #### Request Body - **bid** (string) - Required - Unique identifier for the request. - **data** (object) - Required - Empty object for this command. - **tid** (string) - Required - Transaction ID for the request. - **timestamp** (integer) - Required - Timestamp of the request. - **method** (string) - Required - Must be `return_home`. ### Request Example ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": {}, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "return_home" } ``` ### Response #### Success Response (200) - **bid** (string) - Unique identifier for the response. - **data** (object) - Contains the result of the operation. - **result** (integer) - 0 indicates success. - **output** (object) - Additional information about the return home status. - **status** (string) - Current status (e.g., "in_progress"). - **tid** (string) - Transaction ID for the response. - **timestamp** (integer) - Timestamp of the response. - **method** (string) - Should be `return_home`. #### Response Example ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "result": 0, "output": { "status": "in_progress" } }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "return_home" } ``` ``` -------------------------------- ### One-Key Takeoff (takeoff_to_point) Source: https://context7.com/sb-im/docs/llms.txt Initiates an automated takeoff from the hangar and directs the drone to fly to a specified target point with configured flight parameters. ```APIDOC ## POST /sb-im/docs/takeoff_to_point ### Description Initiates automated takeoff from hangar and fly to specified target point with configured flight parameters. ### Method POST ### Endpoint /sb-im/docs/takeoff_to_point ### Parameters #### Query Parameters - **gateway_sn** (string) - Required - The serial number of the gateway device. #### Request Body - **bid** (string) - Required - Unique identifier for the request. - **data** (object) - Required - Contains the takeoff and flight parameters. - **flight_id** (string) - Required - Identifier for the takeoff mission. - **target_latitude** (number) - Required - The target latitude for the takeoff destination. - **target_longitude** (number) - Required - The target longitude for the takeoff destination. - **target_height** (number) - Required - The target height in meters for the takeoff destination. - **security_takeoff_height** (number) - Required - The safety height during takeoff in meters. - **rth_altitude** (number) - Required - The altitude for Return To Home (RTH) in meters. - **rth_mode** (integer) - Required - The mode for RTH (e.g., 1). - **rc_lost_action** (integer) - Required - Action to take when RC signal is lost (0 = Hover, 1 = Land, 2 = Return to Home). - **commander_mode_lost_action** (integer) - Required - Action to take when commander mode is lost (e.g., 1). - **commander_flight_mode** (integer) - Required - Flight mode for the commander (0 = Smart altitude, 1 = Fixed altitude). - **commander_flight_height** (number) - Required - Flight height in meters when commander flight mode is active. - **max_speed** (number) - Optional - The maximum speed for the flight in m/s. - **simulate_mission** (object) - Optional - Configuration for simulating the mission. - **is_enable** (integer) - Optional - Enable simulation (0 = disabled, 1 = enabled). - **flight_safety_advance_check** (integer) - Optional - Enable advanced flight safety checks (1 = enabled). - **tid** (string) - Required - Unique identifier for the transaction. - **timestamp** (integer) - Required - The timestamp of the request in milliseconds. - **method** (string) - Required - The method name, should be "takeoff_to_point". ### Request Example ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "flight_id": "takeoff-mission-001", "target_latitude": 22.907809, "target_longitude": 113.703482, "target_height": 100, "security_takeoff_height": 50, "rth_altitude": 80, "rth_mode": 1, "rc_lost_action": 2, "commander_mode_lost_action": 1, "commander_flight_mode": 1, "commander_flight_height": 60, "max_speed": 12, "simulate_mission": { "is_enable": 0 }, "flight_safety_advance_check": 1 }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "takeoff_to_point" } ``` ### Response #### Success Response (200) - **bid** (string) - Unique identifier for the response. - **data** (object) - Contains the result of the operation. - **result** (integer) - The result code (0 indicates success). - **tid** (string) - Unique identifier for the transaction. - **timestamp** (integer) - The timestamp of the response in milliseconds. - **method** (string) - The method name, should be "takeoff_to_point". #### Response Example ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "result": 0 }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "takeoff_to_point" } ``` ``` -------------------------------- ### Enter DRC Mode (drc_mode_enter) Source: https://context7.com/sb-im/docs/llms.txt Enables Direct Remote Control mode by establishing a dedicated MQTT broker connection. Requires gateway serial number, and provides MQTT broker details, client ID, username, password, expiration time, and TLS enablement. Returns a result code. ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "mqtt_broker": { "address": "drc-broker.example.com:8883", "client_id": "drc-client-001", "username": "drc_user", "password": "jwt_token_here", "expire_time": 1672744922, "enable_tls": true }, "osd_frequency": 10, "hsi_frequency": 5 }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "drc_mode_enter" } ``` -------------------------------- ### Return to Home (return_home) Source: https://context7.com/sb-im/docs/llms.txt Commands the drone to return to its designated home point (hangar location). The response indicates the status of the return-to-home command, such as 'in_progress'. ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": {}, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "return_home" } ``` -------------------------------- ### Device Property Push (OSD/State) Source: https://context7.com/sb-im/docs/llms.txt Devices push telemetry data (OSD) at 2Hz and state changes on-demand. This enables real-time monitoring of drone and environmental conditions. ```APIDOC ## POST /thing/product/{device_sn}/osd ### Description Devices push telemetry data at 2Hz (OSD) for cloud monitoring. ### Method POST ### Endpoint `thing/product/{device_sn}/osd` ### Parameters #### Query Parameters - **device_sn** (string) - Required - The serial number of the device. #### Request Body - **tid** (string) - Required - Transaction ID for the OSD message. - **bid** (string) - Required - Batch ID for the OSD message. - **timestamp** (integer) - Required - Timestamp of the OSD data. - **gateway** (string) - Required - Serial number of the gateway if applicable. - **data** (object) - Required - Contains the OSD telemetry data. - **network_state** (object) - Optional - Network status. - **type** (integer) - Required - Network type. - **quality** (integer) - Required - Network quality. - **rate** (number) - Required - Network data rate. - **drone_charge_state** (object) - Optional - Drone battery status. - **state** (integer) - Required - Charging state. - **capacity_percent** (integer) - Required - Battery percentage. - **drone_in_dock** (integer) - Optional - Indicates if the drone is in the dock (1 for yes, 0 for no). - **rainfall** (integer) - Optional - Rainfall level. - **wind_speed** (integer) - Optional - Wind speed. - **environment_temperature** (number) - Optional - Ambient temperature. - **temperature** (number) - Optional - Drone internal temperature. - **humidity** (integer) - Optional - Ambient humidity. - **latitude** (number) - Optional - Drone latitude. - **longitude** (number) - Optional - Drone longitude. - **height** (number) - Optional - Drone altitude. - **mode_code** (integer) - Optional - Flight mode code. - **cover_state** (integer) - Optional - Dock cover state. - **emergency_stop_state** (integer) - Optional - Emergency stop state. - **position_state** (object) - Optional - Positioning status. - **is_calibration** (integer) - Required - Calibration status. - **is_fixed** (integer) - Required - Fixed status. - **quality** (integer) - Required - Positioning quality. - **gps_number** (integer) - Required - Number of GPS satellites. - **rtk_number** (integer) - Required - Number of RTK satellites. - **storage** (object) - Optional - Drone storage status. - **total** (integer) - Required - Total storage capacity. - **used** (integer) - Required - Used storage capacity. ### Request Example ```json { "tid": "43d2e632-1558-4c4e-83d2-eeb51b7a377a", "bid": "7578f2ac-1f12-4d47-9ab6-5de146ed7b8a", "timestamp": 1667220916697, "gateway": "dock_sn", "data": { "network_state": { "type": 2, "quality": 0, "rate": 5.097 }, "drone_charge_state": { "state": 0, "capacity_percent": 100 }, "drone_in_dock": 1, "rainfall": 0, "wind_speed": 0, "environment_temperature": 24, "temperature": 24.9, "humidity": 62, "latitude": 22.907809968, "longitude": 113.703482143, "height": 34.174, "mode_code": 1, "cover_state": 0, "emergency_stop_state": 0, "position_state": { "is_calibration": 1, "is_fixed": 2, "quality": 5, "gps_number": 6, "rtk_number": 25 }, "storage": { "total": 82045336, "used": 51772 } } } ``` ## POST /thing/product/{device_sn}/state ### Description Devices push state changes on-demand for cloud monitoring. ### Method POST ### Endpoint `thing/product/{device_sn}/state` ### Parameters #### Query Parameters - **device_sn** (string) - Required - The serial number of the device. #### Request Body - **tid** (string) - Required - Transaction ID for the state change notification. - **bid** (string) - Required - Batch ID for the state change notification. - **timestamp** (integer) - Required - Timestamp of the state change. - **gateway** (string) - Required - Serial number of the gateway if applicable. - **data** (object) - Required - Contains the state change information. - **live_capacity** (object) - Optional - Live video capacity information. - **available_video_number** (integer) - Required - Number of available video streams. - **coexist_video_number_max** (integer) - Required - Maximum number of concurrent video streams. - **device_list** (array) - Optional - List of devices with video capabilities. ### Request Example ```json { "tid": "6a7bfe89-c386-4043-b600-b518e10096cc", "bid": "42a19f36-5117-4520-bd13-fd61d818d52e", "timestamp": 1598411295123, "gateway": "sn", "data": { "live_capacity": { "available_video_number": 2, "coexist_video_number_max": 2, "device_list": [] } } } ``` ``` -------------------------------- ### Bind Device to Organization Source: https://context7.com/sb-im/docs/llms.txt Bind devices to an organization using a device binding code, enabling cloud management capabilities. ```APIDOC ## Bind Device to Organization (airport_organization_bind) ### Description Bind devices to an organization using a device binding code, enabling cloud management capabilities. ### Method POST ### Endpoint `thing/product/{gateway_sn}/requests` ### Parameters #### Query Parameters None #### Request Body - **bid** (string) - Required - Unique identifier for the request. - **data** (object) - Required - Contains binding information. - **bind_devices** (array) - Required - List of devices to bind. - **sn** (string) - Required - Serial number of the device. - **device_binding_code** (string) - Required - The code used to bind the device. - **organization_id** (string) - Required - The ID of the organization to bind to. - **device_callsign** (string) - Required - The callsign for the device within the organization. - **device_model_key** (string) - Required - The model key of the device. - **tid** (string) - Required - Transaction ID. - **timestamp** (integer) - Required - Timestamp of the request. - **method** (string) - Required - The method name, should be `airport_organization_bind`. ### Request Example ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "bind_devices": [ { "sn": "dock-sn", "device_binding_code": "BIND-CODE-123", "organization_id": "org-12345", "device_callsign": "SuperDock-01", "device_model_key": "3-88099-0" }, { "sn": "drone-sn", "device_binding_code": "BIND-CODE-123", "organization_id": "org-12345", "device_callsign": "M3E-Drone", "device_model_key": "0-77-0" } ] }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "airport_organization_bind" } ``` ### Response #### Success Response (200) - **bid** (string) - Unique identifier for the response. - **data** (object) - Contains the result of the binding operation. - **output** (object) - Output details. - **err_infos** (array) - List of error information if any binding failed. - **result** (integer) - Result code, 0 for success. - **tid** (string) - Transaction ID. - **timestamp** (integer) - Timestamp of the response. - **method** (string) - The method name, should be `airport_organization_bind`. #### Response Example ```json { "bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "data": { "output": { "err_infos": [] }, "result": 0 }, "tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx", "timestamp": 1654070968655, "method": "airport_organization_bind" } ``` ```