FlightHub Sync
  1. FlightHub
FlightHub Sync
  • FlightHub
    • FlightFub Webhook
    • ENV
    • Error Code
    • Live stream forwarding
      • Start Stream Forwarding
      • Stop Stream Forwarding
      • Get Stream Forwarding Channel Transcoder
    • Task distribution
      • Get Flight Task Files List
      • Create Flight Task
      • Commands During the Flight Task
      • Flight Task Trajectory Acquisition
      • Project Equipment Topology
      • Get Flight Task Details
    • Get Organization Project List
      GET
    • Get Project Device List
      GET
    • Push Event Notification and Map Annotation
      POST
    • Get Temporary Upload Token
      POST
    • Notify of Route File Upload
      POST
    • Get File Information and Download Address
      GET
  1. FlightHub

Push Event Notification and Map Annotation

POST
/map/api/v1.0/projects/{project_uuid}/elements
Through this interface, third-party cloud platforms can send key event information to FlightHub 2, including location, description, etc.
The element format can be referenced at: https://geojson.org/

Request

Path Params
project_uuid
string 
required
Example:
{{project_uuid}}
Header Params
X-Organization-Key
string 
required
Example:
{{orgnazation_key}}
Body Params application/json
element_source
integer 
required
Reserved field
name
string 
required
Element name
desc
string 
required
Element description
resource
object 
required
Resource
type
integer 
required
Element type, 0: point, 1: line, 2: surface
content
object 
required
Content
Example
// pin点
{
  "name": "元素名称",
  "desc": "描述",
  "resource": {
    "type": 0,
    "content": {
      "type": "Feature",
      "properties": {
        "color": "#2D8CF0",
        "clampToGround": true
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          108.42625652534299,
          30.59263023356542,
          0
        ]
      }
    }
  }
}

//线
{
  "name": "元素名称",
  "desc": "描述",
  "resource": {
    "type": 1,
    "content": {
      "type": "Feature",
      "properties": {
        "color": "#2D8CF0"
      },
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [
            110.78912343493995,
            28.7786761289101
          ],
          [
            110.78980969315512,
            28.777435625158603
          ]
        ]
      }
    }
  }
}

//多边形
{
  "name": "元素名称",
  "desc": "描述",
  "resource": {
    "type": 2,
    "content": {
      "type": "Feature",
      "properties": {
        "color": "#2D8CF0"
      },
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              110.79093322779515,
              28.78036215346328
            ],
            [
              110.7908800891774,
              28.777869391788467
            ],
            [
              110.7942962561357,
              28.7796971945124
            ]
          ]
        ]
      }
    }
  }
}

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 -g --request POST '/map/api/v1.0/projects/{{project_uuid}}/elements' \
--header 'X-Organization-Key: {{orgnazation_key}}' \
--header 'X-Organization-Key;' \
--header 'Content-Type: application/json' \
--data-raw '// pin点
{
  "name": "元素名称",
  "desc": "描述",
  "resource": {
    "type": 0,
    "content": {
      "type": "Feature",
      "properties": {
        "color": "#2D8CF0",
        "clampToGround": true
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          108.42625652534299,
          30.59263023356542,
          0
        ]
      }
    }
  }
}

//线
{
  "name": "元素名称",
  "desc": "描述",
  "resource": {
    "type": 1,
    "content": {
      "type": "Feature",
      "properties": {
        "color": "#2D8CF0"
      },
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [
            110.78912343493995,
            28.7786761289101
          ],
          [
            110.78980969315512,
            28.777435625158603
          ]
        ]
      }
    }
  }
}

//多边形
{
  "name": "元素名称",
  "desc": "描述",
  "resource": {
    "type": 2,
    "content": {
      "type": "Feature",
      "properties": {
        "color": "#2D8CF0"
      },
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              110.79093322779515,
              28.78036215346328
            ],
            [
              110.7908800891774,
              28.777869391788467
            ],
            [
              110.7942962561357,
              28.7796971945124
            ]
          ]
        ]
      }
    }
  }
}'

Responses

🟢200成功
application/json
Body
code
integer 
required
Error, when not zero
message
string 
required
data
object 
required
id
string 
required
Example
{
  "code": 0,
  "message": "success",
  "data": {
    "id": "cdb6f644-8925-463d-8977-564e866d7e86"
  }
}
🟠401未授权
Previous
Get Project Device List
Next
Get Temporary Upload Token
Built with