List

OpenAPI DocumentationClick here to view the OpenAPI documentation for center server data service under device category.

The following content is provided to improve development efficiency, offering example request and response diagrams before code development, helping developers deeply understand business requirements. This is also supplementary to the OpenAPI documentation generated from code comments, elaborating on parts not covered by code comments, thereby reducing code development workload.

Request Path

/main-service/main-api/v1/retail/device/data-acquisition-device/list

Request Structure (Api request)

Fields

TIP
  • Query parameters:
    • options: Query options, example value: dataAcquisitionServer,deviceShare,deviceShareList, example value description:
      • dataAcquisitionServer: Bound collection server information.
      • deviceShare: Device share information. When state is not equal to bind, this information presents devices shared by others, sharing relationship is one-to-one.
      • deviceShareList: Device share list information. When state equals bind, this list presents information about own devices shared to others, sharing relationship is one-to-many.
    • cache: Default value true, indicates reading data from cache; can be set to false to indicate not reading from cache), supporting true/false, yes/no, on/off, 1/0, Y/N and other formats

Example

/main-service/main-api/v1/retail/device/data-acquisition-device/list?options=dataAcquisitionServer,deviceShare,deviceShareList&cache=false

Illustration

  • Main interface uses options=dataAcquisitionServer
  • Device share list interface uses options=deviceShare,deviceShareList
  • Try to avoid using cache=false

Response Structure (Api response)

Fields

TIP
  • data: Response data, this is an optional field, only displays corresponding content when actually needing to return data.
    • webrtcOnlineStatus: Whether webrtc program on device is online. To avoid frequently calling this interface to obtain webrtc online status (this operation consumes performance), it is recommended to obtain via mqtt batch from server, system additionally provides corresponding interface.
    • iotOnlineStatus: Whether iot program on device is online. Similarly, to avoid frequently calling this interface to obtain iot online status (this operation consumes performance), it is recommended to obtain via mqtt batch from server, system additionally provides corresponding interface.
    • state: When state equals bind, indicates this device is own device; when state is not equal to bind, indicates this device is shared by others, sourceUsername is sharer username.
    • dataAcquisitionServer: Bound collection server information.
    • deviceShare: Device share information. When state is not equal to bind, this information presents devices shared by others, sharing relationship is one-to-one.
    • deviceShareList: Device share list information. When state equals bind, this list presents information about own devices shared to others, sharing relationship is one-to-many.
    • sourceUsername: Sharer or manager username. When state is bind, indicates warehouse administrator username.

Example

HTTP: response application/json
1{
2    "timestamp": 1750406579448,
3    "status": 200,
4    "data": [
5        {
6            "deviceId": "d62fc658289b4354a3deeece043e4ed1",
7            "deviceNo": "90000188",
8            "name": "90000188",
9            "state": "To be confirm share",
10            "createdUsername": "svmikg",
11            "createdTime": 1750297488,
12            "lastModifiedUsername": "svmikg",
13            "lastModifiedTime": 1750297488,
14            "tenantId": "f581e0f79e934fffa85b14c1c1efacb3",
15            "sourceUsername": "svmikg",
16            "sourceTenantId": "7d187c6865df4d639c1b688a9fa8c790",
17            "sourceDeviceId": "620c35e4d0554013b6a38d5d637c49ff",
18            "iotOnlineStatus": false,
19            "webrtcOnlineStatus": false,
20            "onlineStatus": true,
21            "dataAcquisitionServer": {
22                "deviceId": "hpoPD9I7n8rYDXwiDLUmN",
23                "deviceNo": "test-111",
24                "name": "test-111",
25                "createdUsername": "admin",
26                "createdTime": 1747798318,
27                "lastModifiedUsername": "admin",
28                "lastModifiedTime": 1747798474,
29                "tenantId": "default",
30                "dataAcquisitionServerId": "hpoPD9I7n8rYDXwiDLUmN",
31                "domainNameWebPort": 3000,
32                "domainNameUploadPort": 3000,
33                "externalIpWebPort": 3000,
34                "externalIpUploadPort": 3000,
35                "internalIpWebPort": 3000,
36                "internalIpUploadPort": 3000,
37                "privateIpWebPort": 3000,
38                "privateIpUploadPort": 3000
39            },
40            "deviceShare": {
41                "deviceShareId": "e853712d64e73209f3cd3a1dd849833e",
42                "deviceId": "620c35e4d0554013b6a38d5d637c49ff",
43                "targetUsername": "zebfuu",
44                "state": "To be confirm share",
45                "inviteTime": 1750297488,
46                "createdUsername": "svmikg",
47                "createdTime": 1750297488,
48                "lastModifiedUsername": "svmikg",
49                "lastModifiedTime": 1750297488,
50                "tenantId": "7d187c6865df4d639c1b688a9fa8c790",
51                "targetTenantId": "f581e0f79e934fffa85b14c1c1efacb3"
52            }
53        },
54        {
55            "deviceId": "78bc8024b9424cff8eb0d23b4730faf5",
56            "deviceNo": "24093200478",
57            "name": "Test Device",
58            "state": "bind",
59            "createdUsername": "zebfuu",
60            "createdTime": 1750398648,
61            "lastModifiedUsername": "zebfuu",
62            "lastModifiedTime": 1750398648,
63            "tenantId": "f581e0f79e934fffa85b14c1c1efacb3",
64            "sourceUsername": "admin",
65            "sourceTenantId": "default",
66            "sourceDeviceId": "b8mCAOrZ0WIOIzUgeLw0L",
67            "iotOnlineStatus": false,
68            "webrtcOnlineStatus": false,
69            "onlineStatus": true,
70            "dataAcquisitionServer": {
71                "deviceId": "hpoPD9I7n8rYDXwiDLUmN",
72                "deviceNo": "test-111",
73                "name": "test-111",
74                "createdUsername": "admin",
75                "createdTime": 1747798318,
76                "lastModifiedUsername": "admin",
77                "lastModifiedTime": 1747798474,
78                "tenantId": "default",
79                "dataAcquisitionServerId": "hpoPD9I7n8rYDXwiDLUmN",
80                "domainNameWebPort": 3000,
81                "domainNameUploadPort": 3000,
82                "externalIpWebPort": 3000,
83                "externalIpUploadPort": 3000,
84                "internalIpWebPort": 3000,
85                "internalIpUploadPort": 3000,
86                "privateIpWebPort": 3000,
87                "privateIpUploadPort": 3000
88            },
89            "deviceShareList": [
90                {
91                    "deviceShareId": "70ac13627576e3806099a19198b07363",
92                    "deviceId": "78bc8024b9424cff8eb0d23b4730faf5",
93                    "targetUsername": "svmikg",
94                    "state": "To be confirm share",
95                    "inviteTime": 1750399164,
96                    "createdUsername": "zebfuu",
97                    "createdTime": 1750399164,
98                    "lastModifiedUsername": "zebfuu",
99                    "lastModifiedTime": 1750399164,
100                    "tenantId": "f581e0f79e934fffa85b14c1c1efacb3",
101                    "targetTenantId": "7d187c6865df4d639c1b688a9fa8c790",
102                    "deviceManage": "zebfuu"
103                }
104            ]
105        }
106    ]
107}

Illustration

TIP

Prototype Design

  • Device list
    • Device: 24076780002
      • state value is bind, this device belongs to self.
      • Device number
      • Device name
      • Collection server number and other fields (omitted here)
      • Device share list (shared to others)
        • Device share
          • Target username: 913251650@qq.com
          • Device share ID
          • Invitation time and other fields (omitted here)
        • Device share
          • Target username: 913251651@qq.com
          • Device share ID
          • Invitation time and other fields (omitted here)
    • Device: 24076780003
      • state is bind, this device belongs to self.
      • Device number
      • Device name
      • Collection server number and other fields (omitted here)
      • Device share list (shared to others): empty
    • Device: 24076780004
      • state is not equal to bind, indicates this device is shared by others, sourceUsername is sharer username.
      • Device number
      • Device name
      • Collection server number and other fields (omitted here)
      • Device share
        • Device share ID
        • Invitation time and other fields (omitted here)