跳到主要内容

Get Device Topology

Get Device Topology List

When Enterprise goes online for the first time, it sends an HTTP request to get the list of all devices and their topology in the same workspace. The server needs to send the entire device list to Enterprise. Additionally, when receiving websocket instructions to notify devices online/offline/update, it is also necessary to call this interface to request the device topology list for updates.

GET /manage/api/v1/workspaces/{workspace_id}/devices/topologies

Parameters

NameInTypeRequiredDescription
workspace_idpathstringtrueWorkspace ID (all devices in the same space can share device topology and telemetry information)
x-auth-tokenheaderstringtrueAccess Token

Responses

StatusMeaningDescriptionSchema
200OKOKtsa.GetWebPrjDeviceForOpenPlatformRsp

Example responses

{
"code": 0,
"message": "success",
"data": {
"list": [
{
"hosts": [

],
"parents": [
{
"sn": "test",
"model": "test",
"boundStatus": false,
"domain": 41,
"device_callsign": "test",
"device_model": {
"domain": 41,
"type": 410000,
"sub_type": 0
},
"online_status": false,
"user_callsign": "ws_device",
"icon_urls": {
"normal_icon_url": "",
"selected_icon_url": ""
}
}
]
},
{
"hosts": [

],
"parents": [
{
"sn": "NM1923361026",
"model": "Test Nest2",
"boundStatus": false,
"domain": 3,
"device_callsign": "Test Nest2",
"device_model": {
"domain": 3,
"type": 30001,
"sub_type": 0
},
"online_status": true,
"user_callsign": "ws_device",
"icon_urls": {
"normal_icon_url": "",
"selected_icon_url": ""
}
}
]
},
{
"hosts": [

],
"parents": [
{
"sn": "DOCK1748FEV3HMB923391016",
"model": "Test Nest_R10610",
"boundStatus": false,
"domain": 3,
"device_callsign": "Test Nest_R10610",
"device_model": {
"domain": 3,
"type": 30000,
"sub_type": 0
},
"online_status": false,
"user_callsign": "ws_device",
"icon_urls": {
"normal_icon_url": "",
"selected_icon_url": ""
}
}
]
},
{
"hosts": [
{
"sn": "HMA923359003",
"model": "Test Drone11",
"boundStatus": false,
"gatewaySn": "NM1923261001",
"domain": 0,
"device_callsign": "Test Drone11",
"device_model": {
"domain": 0,
"type": 11000,
"sub_type": 0
},
"online_status": false,
"user_callsign": "ws_device",
"icon_urls": {
"normal_icon_url": "",
"selected_icon_url": ""
}
}
],
"parents": [
{
"sn": "NM1923261001",
"model": "Test Nest1",
"boundStatus": false,
"domain": 3,
"device_callsign": "Test Nest1",
"device_model": {
"domain": 3,
"type": 30001,
"sub_type": 0
},
"online_status": false,
"user_callsign": "ws_device",
"icon_urls": {
"normal_icon_url": "",
"selected_icon_url": ""
}
}
]
},
{
"hosts": [
{
"sn": "1748FEV3HMB923351062",
"model": "Test Drone(sst)",
"boundStatus": false,
"gatewaySn": "DOCK1748FEV3HMB923351062",
"domain": 0,
"device_callsign": "Test Drone(sst)",
"device_model": {
"domain": 0,
"type": 11000,
"sub_type": 0
},
"online_status": false,
"user_callsign": "ws_device",
"icon_urls": {
"normal_icon_url": "",
"selected_icon_url": ""
}
}
],
"parents": [
{
"sn": "DOCK1748FEV3HMB923351062",
"model": "Test Nest5",
"boundStatus": false,
"domain": 3,
"device_callsign": "Test Nest5",
"device_model": {
"domain": 3,
"type": 30000,
"sub_type": 0
},
"online_status": false,
"user_callsign": "ws_device",
"icon_urls": {
"normal_icon_url": "",
"selected_icon_url": ""
}
}
]
},
{
"hosts": [
{
"sn": "1748FEV3HMA922482077",
"model": "panfan_test_Drone2077",
"boundStatus": false,
"gatewaySn": "THtest234567",
"domain": 0,
"device_callsign": "panfan_test_Drone2077",
"device_model": {
"domain": 0,
"type": 11000,
"sub_type": 0
},
"online_status": true,
"user_callsign": "ws_device",
"icon_urls": {
"normal_icon_url": "",
"selected_icon_url": ""
}
}
],
"parents": [
{
"sn": "THtest234567",
"model": "123456",
"boundStatus": false,
"domain": 2,
"device_callsign": "123456",
"device_model": {
"domain": 2,
"type": 20119,
"sub_type": 0
},
"online_status": true,
"user_callsign": "ws_device",
"icon_urls": {
"normal_icon_url": "",
"selected_icon_url": ""
}
}
]
},
{
"hosts": [

],
"parents": [
{
"sn": "TH7923351722",
"model": "panfan_rc_test_1722",
"boundStatus": false,
"domain": 2,
"device_callsign": "panfan_rc_test_1722",
"device_model": {
"domain": 2,
"type": 20119,
"sub_type": 0
},
"online_status": false,
"user_callsign": "ws_device",
"icon_urls": {
"normal_icon_url": "",
"selected_icon_url": ""
}
}
]
}
]
}
}

Schemas

tsa.GetWebPrjDeviceForOpenPlatformRsp

{
"code":0,
"message":"success",
"data":{
"list":[
{
"hosts":[
{
"device_callsign":"string",
"device_model":{
"key":"string",
"domain":"string",
"type":"string",
"sub_type":"string"
},
"icon_urls":{
"normal_icon_url":"string",
"selected_icon_url":"string"
},
"online_status":true,
"sn":"string",
"user_callsign":"string",
"user_id":"string"
}
],
"parents":[
{
"device_callsign":"string",
"device_model":{
"key":"string",
"domain":"string",
"type":"string",
"sub_type":"string"
},
"icon_urls":{
"normal_icon_url":"string",
"selected_icon_url":"string"
},
"online_status":true,
"sn":"string",
"user_callsign":"string",
"user_id":"string"
}
]
}
]
}
}

Properties

NameTypeRequiredRestrictionsDescription
list[tsa.DeviceTopoRsp]falsenonenone

tsa.DeviceTopoRsp

{
"hosts": [
{
"device_callsign": "string",
"device_model": {
"key":"string",
"domain":"string",
"type":"string",
"sub_type":"string"
},
"icon_urls": {
"normal_icon_url": "string",
"selected_icon_url": "string"
},
"online_status": true,
"sn": "string",
"user_callsign": "string",
"user_id": "string"
}
],
"parents": [
{
"device_callsign": "string",
"device_model": {
"key":"string",
"domain":"string",
"type":"string",
"sub_type":"string"
},
"icon_urls": {
"normal_icon_url": "string",
"selected_icon_url": "string"
},
"online_status": true,
"sn": "string",
"user_callsign": "string",
"user_id": "string"
}
]
}

Properties

NameTypeRequiredRestrictionsDescription
hosts[tsa.TopoHostDeviceRsp]falsenoneAircraft Device Topology Collection
parents[tsa.TopoGatewayDeviceRsp]falsenoneGateway Device Topology Collection

tsa.TopoGatewayDeviceRsp

{
"device_callsign": "string",
"device_model": {
"key":"string",
"domain":"string",
"type":"string",
"sub_type":"string"
},
"icon_urls": {
"normal_icon_url": "string",
"selected_icon_url": "string"
},
"online_status": true,
"sn": "string",
"user_callsign": "string",
"user_id": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
device_callsignstringfalsenoneDevice Call Sign
device_modeltsa.DeviceModelEnumfalsenoneDevice Model Enum Structure
icon_urlsobjectfalsenoneCustom Icons, if empty, it will automatically load according to the device_model type. If not empty, it will display the configured images.
» normal_icon_urlstringfalsenoneIcon in Normal State
» selected_icon_urlstringfalsenoneIcon in Selected State
online_statusbooleanfalsenoneDevice Online Status
snstringfalsenoneDevice Serial Number
user_callsignstringfalsenoneUser Call Sign
user_idstringfalsenoneUser ID

tsa.TopoHostDeviceRsp

{
"device_callsign": "string",
"device_model": {
"key":"string",
"domain":"string",
"type":"string",
"sub_type":"string"
},
"icon_urls": {
"normal_icon_url": "string",
"selected_icon_url": "string"
},
"online_status": true,
"sn": "string",
"user_callsign": "string",
"user_id": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
device_callsignstringfalsenoneDevice Call Sign
device_modeltsa.DeviceModelEnumfalsenoneDevice Model Enum Structure
icon_urlsobjectfalsenoneCustom Icons, if empty, it will automatically load according to the device_model type. If not empty, it will display the configured images.
» normal_icon_urlstringfalsenoneIcon in Normal State
» selected_icon_urlstringfalsenoneIcon in Selected State
online_statusbooleanfalsenoneDevice Online Status
snstringfalsenoneDevice Serial Number
user_callsignstringfalsenoneUser Call Sign
user_idstringfalsenoneUser ID

tsa.DeviceModelEnum

{
"domain": "string",
"key": "string",
"sub_type": "string",
"type": "text"
}

Properties

NameTypeRequiredRestrictionsDescription
domainstringfalsenoneProduct Enum Type
keystringfalsenoneProduct Enum Primary Key ID
sub_typestringfalsenoneProduct Enum Subtype
typestringfalsenoneProduct Enum Main Type