Feature #1803
web对外提供获取实时数据的接口
100%
Files
History
Updated by yanwei li almost 3 years ago
- File web服务接口.docx web服务接口.docx added
- Due date set to 11/18/2021
- Status changed from New to Resolved
- % Done changed from 0 to 100
接口名称:getYxRd
URL /dataServ
HTTP请求方式 POST
--------------------------------------
请求参数:
字段名 是否加密 是否必须 字段描述及说明
type N Y 接口名称
para N Y 待查询数据(json格式)
id N Y 点代码
type N Y 固定值yx
-------------------------------------------------------------
示例
POST / dataServ
HTTP/1.1
Host: 192.168.2.119:8080/IWebServer
Content-Type: application/x-www-form-urlencoded
type=getYxRd
para= [{
"id":"",
"type":"yx"
},
...]
-----------------------------------------------------------
返回结果示例(JSON示例)
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"state": 1,
"msg": "",
"data": [
{
"attributeId": "",
"attributeName": "",
"currentValue": 1,
"currentValueInfo": ""
},
...
]
}
-------------------------------------------------------------------
应答body参数说明
字段名 字段类型和范围 是否可以为空 字段描述
state int N 0表示错误1表示正常
msg string Y 错误描述
attributeId string N 点代码
attributeName string Y 点描述
currentValue int Y 点值,当出现-1时,表示点代码错误
currentValueInfo string Y 点值描述