Project

General

Profile

Feature #1803

web对外提供获取实时数据的接口

Added by yanwei li almost 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
yanwei li
Target version:
Start date:
11/15/2021
Due date:
11/18/2021
% Done:

100%

Estimated time:
Defect version:

Files

web服务接口.docx (380 KB) web服务接口.docx yanwei li, 11/18/2021 04:29 PM
web服务接口.docx (380 KB) web服务接口.docx yanwei li, 11/19/2021 03:49 PM

History

#1

Updated by yanwei li almost 3 years ago

接口名称: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 点值描述

#2

Updated by yanwei li almost 3 years ago

修改了一些代码逻辑,返回值的名称做了一些改动

Also available in: Atom PDF