GET api/User/GetUserSensors?userId={userId}
获取用户的传感器
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| userId |
用户编号 |
string |
Required |
Body Parameters
None.
Response Information
Resource Description
通用报文响应结果{ Success: bool , Code: int , Error: string , Result:string } Success: 是否执行成功. 成功为 true Code: 错误代码. 1 执行成功 , 0, 没有处理 , < 执行失败 Error: 错误消息. Result: 如果有结果,结果保存在此字段中 [{"Id":"", "UID_16":"", GatewayID":"", CreateTime":"", SensorName":"", "SensorId":"", "LastActive":"", "LastBelongUser":""}]
JResultOfListOfSensorInfos| Name | Description | Type | Additional information |
|---|---|---|---|
| Code | integer |
None. |
|
| Error | string |
None. |
|
| Result | Collection of SensorInfos |
None. |
|
| Success | boolean |
None. |
Response Formats
application/json, text/json
Sample:
{
"Code": 1,
"Error": "sample string 2",
"Result": [
{
"Id": 1,
"UID_16": "sample string 2",
"GatewayID": "sample string 3",
"CreateTime": "2026-04-30T19:29:33.4067271+08:00",
"SensorName": "sample string 4",
"SensorId": "sample string 5",
"LastActive": "2026-04-30T19:29:33.4067271+08:00",
"LastBelongUser": "sample string 6"
},
{
"Id": 1,
"UID_16": "sample string 2",
"GatewayID": "sample string 3",
"CreateTime": "2026-04-30T19:29:33.4067271+08:00",
"SensorName": "sample string 4",
"SensorId": "sample string 5",
"LastActive": "2026-04-30T19:29:33.4067271+08:00",
"LastBelongUser": "sample string 6"
}
],
"Success": true
}