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
Name | In | Type | Required | Description |
---|---|---|---|---|
workspace_id | path | string | true | Workspace ID (all devices in the same space can share device topology and telemetry information) |
x-auth-token | header | string | true | Access Token |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | tsa.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
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
list | [tsa.DeviceTopoRsp] | false | none | none |
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
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
hosts | [tsa.TopoHostDeviceRsp] | false | none | Aircraft Device Topology Collection |
parents | [tsa.TopoGatewayDeviceRsp] | false | none | Gateway 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
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
device_callsign | string | false | none | Device Call Sign |
device_model | tsa.DeviceModelEnum | false | none | Device Model Enum Structure |
icon_urls | object | false | none | Custom Icons, if empty, it will automatically load according to the device_model type. If not empty, it will display the configured images. |
» normal_icon_url | string | false | none | Icon in Normal State |
» selected_icon_url | string | false | none | Icon in Selected State |
online_status | boolean | false | none | Device Online Status |
sn | string | false | none | Device Serial Number |
user_callsign | string | false | none | User Call Sign |
user_id | string | false | none | User 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
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
device_callsign | string | false | none | Device Call Sign |
device_model | tsa.DeviceModelEnum | false | none | Device Model Enum Structure |
icon_urls | object | false | none | Custom Icons, if empty, it will automatically load according to the device_model type. If not empty, it will display the configured images. |
» normal_icon_url | string | false | none | Icon in Normal State |
» selected_icon_url | string | false | none | Icon in Selected State |
online_status | boolean | false | none | Device Online Status |
sn | string | false | none | Device Serial Number |
user_callsign | string | false | none | User Call Sign |
user_id | string | false | none | User ID |
tsa.DeviceModelEnum
{
"domain": "string",
"key": "string",
"sub_type": "string",
"type": "text"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
domain | string | false | none | Product Enum Type |
key | string | false | none | Product Enum Primary Key ID |
sub_type | string | false | none | Product Enum Subtype |
type | string | false | none | Product Enum Main Type |