数据获取API文档

全局参数说明

参数说明

uid 用户编号,用户登录有返回的用户编号。
sid 设备编号,
st 数据开始时间,Unix时间戳格式
et 数据结束时间,Unix时间戳格式
key 用户密码(调试期间不需要)只有和UID 一一对应后才会有返回。

URL

HTTP域名: http://www.environ.online
HTTPS域名: https://www.environ.online

站点列表

URL

/stationsWebJson.action?uid=UID&key=KEY

JSON内容示例

[{"sid":"190","name":"斑鸠堰河","num":"20171016055101","type":"4","pollute":"地表水","trade":"20171016055101","area":"103104101103","address":"安徽省合肥市蜀山区","pcip":"192.168.0.254","freq":"120","pcport":"48877","cid":"33","net":"1","protocol":"0","forward":"0","effect":"0","userId":"37","examine":"0","supervise":"0","lastTime":"0","coorx":"117.128235","coory":"31.790194","zoom":"0","start":"0","end":"0","state":"1","stId":"0"},{"sid":"191","name":"岳小河","num":"20171016055102","type":"4","pollute":"地表水","trade":"20171016055102","area":"103104101103","address":"安徽省合肥市蜀山区","pcip":"192.168.0.254","freq":"120","pcport":"4595","cid":"33","net":"1","protocol":"0","forward":"0","effect":"0","userId":"37","examine":"0","supervise":"0","lastTime":"0","coorx":"117.10907","coory":"31.79118","zoom":"0","start":"0","end":"0","state":"1","stId":"0"},{"sid":"192","name":"柏堰湖","num":"20171016055103","type":"4","pollute":"地表水","area":"103104101103","address":"","pcip":"192.168.0.254","image":"","card":"","freq":"250","pcport":"47265","cid":"33","net":"1","protocol":"0","forward":"0","effect":"0","userId":"37","examine":"0","supervise":"0","lastTime":"0","coorx":"117.143715","coory":"31.81468","zoom":"0","start":"0","end":"0","state":"1","stId":"0"}]

JSON说明

Sid		站点ID
name		名称
num		国标编码(GB212中国标编码)
type		站点类型
trade		行业类型编码(废弃)
provin		站点所在地址 省
city		市
county		县
area		地区
address		详细地址
table		数据表名称(废弃)
pcip		客户端IP
tatus		设备状态
image		站点缩略图
card		SIM卡号
freq		传输频率
port		客户端Port 
cid		企业编号
net		联网状态;1:在线,0:不在线
ssid		设备状态
state		设备状态
effect	
userId		管理员 用户ID
examine		一级审核 用户ID
supervise	二级审核 用户ID
lasttime	最后在线时间,Unix时间戳格式。
upside		上游站点编号
counter		当日传输数据计数
normal		当日正常数据计数
alarmer		当日异常数据计数
coorx		经度
coory		维度
zoom		放大倍数
start		起始 偏移
end		结束 偏移
protocol	协议类型
forward		是否转发
						

监测站点监测因子

URL

启用的监测因子: /getShowDevicesJson.action?sid=SID&key=KEY
全部的监测因子: /getAllDevicesJson.action?sid=SID (注意:站点预分配的全部监测因子, 包括不启用不显示的)

JSON内容示例

[{"did":"17412","sid":"520","fid":"75","valid":"1","show":"1","concise":"0","limit":"60.0","lower":"0.0","alarm":"0","modulus":"1.0","margin":"0.0","order":"75","decimal":"3","name":"风速","code":"a01007","mark":"Rtd","unit":"m/s","field":"Fact03"},{"did":"17413","sid":"520","fid":"76","valid":"1","show":"1","concise":"0","limit":"360.0","lower":"0.0","alarm":"0","modulus":"1.0","margin":"0.0","order":"76","decimal":"3","name":"风向","code":"a01008","mark":"Rtd","unit":"度","field":"Fact04"}]

JSON说明

Did	设备编号
Sid	站点名称
Fid	因子编号
valid	是否启用
show	是否显示
limit	报警上限
lower	报警下限
alarm	是否报警
modulus	倍数(说明:DB数据*倍数+系数=展示数据)
margin	系数
order	排序(越小越靠前显示)
decimal	小数位(展示数据四舍五入保留小数位)
name	显示名称
code	国标编码
type	因子类型
mark	备注
unit	显示单位
field	数据存储字段

监测站点最新数据

URL

/itemsJson.action?sid=SID&key=KEY

JSON内容示例

[{"dtime":"0","name":"数据时间","value":"11-26","unit":"12:31","flag":"-1"},{"dtime":"0","name":"风速","value":"0.7","unit":"m/s","flag":"0"},{"dtime":"0","name":"风向","value":"92.0","unit":"度","flag":"0"},{"dtime":"0","name":"大气压","value":"98.0","unit":"HPa","flag":"0"},{"dtime":"0","name":"大气温度","value":"12.3","unit":"℃","flag":"0"},{"dtime":"0","name":"大气湿度","value":"46.7","unit":"%","flag":"0"},{"dtime":"0","name":"PM2.5","value":"59.7","unit":"ug/m3","flag":"0"},{"dtime":"0","name":"PM10","value":"159.6","unit":"ug/m3","flag":"0"},{"dtime":"0","name":"噪声","value":"61.8","unit":"dB","flag":"0"},{"dtime":"0","name":"扬尘","value":"161.6","unit":"ug/m3","flag":"0"}]

JSON说明

{"dtime":"0","name":"数据时间","value":"11-26","unit":"12:31","flag":"-1"}	value: 本条数据日期(MM-DD) unit:本条数据时间(HH:mm)(固定返回)
{"dtime":"0","name":"风速","value":"0.7","unit":"m/s","flag":"0"}	name:因子名称,value:监测数据,unit:因子单位,code:因子编码,flag:因子标识(动态返回,不同站点个数不一样)
{"dtime":"0","name":"风向","value":"92.0","unit":"度","flag":"0"}	name:因子名称,value:监测数据,unit:因子单位,code:因子编码 ,flag:因子标识(动态返回,不同站点个数不一样)

监测站点实时数据/小时数据/日数据

URL

实时数据:/realDataJson.action?sid=SID&st=1526313600&et=1526486340&key=KEY
小时数据:/hourDataJson.action?sid=SID&st=1526313600&et=1526400000&key=KEY
日数据:/reportMonthJson.action?sid=SID&st=1526313600&et=1526400000&key=KEY

JSON内容示例

{"total":3,"rows":[{"ddate":"2018-05-15","dtime":"16:53:00","Fact03":"0.0","Name":"风速","Value":"0.0","Unit":"m/s","Fact04":"0.0","Name":"风向","Value":"0.0","Unit":"度","Fact05":"0.0","Name":"大气压","Value":"0.0","Unit":"HPa","Fact12":"0.0","Name":"大气温度","Value":"0.0","Unit":"℃","Fact13":"0.0","Name":"大气湿度","Value":"0.0","Unit":"%","Fact20":"7.0","Name":"PM2.5","Value":"7.0","Unit":"ug/m3","Fact21":"10.0","Name":"PM10","Value":"10.0","Unit":"ug/m3","Fact28":"29.0","Name":"噪声","Value":"29.0","Unit":"dB","Fact29":"37.0","Name":"扬尘","Value":"37.0","Unit":"ug/m3"},{"ddate":"2018-05-15","dtime":"16:52:00","Fact03":"0.0","Name":"风速","Value":"0.0","Unit":"m/s","Fact04":"0.0","Name":"风向","Value":"0.0","Unit":"度","Fact05":"0.0","Name":"大气压","Value":"0.0","Unit":"HPa","Fact12":"0.0","Name":"大气温度","Value":"0.0","Unit":"℃","Fact13":"0.0","Name":"大气湿度","Value":"0.0","Unit":"%","Fact20":"7.0","Name":"PM2.5","Value":"7.0","Unit":"ug/m3","Fact21":"10.0","Name":"PM10","Value":"10.0","Unit":"ug/m3","Fact28":"29.0","Name":"噪声","Value":"29.0","Unit":"dB","Fact29":"37.0","Name":"扬尘","Value":"37.0","Unit":"ug/m3"},{"ddate":"2018-05-15","dtime":"16:51:00","Fact03":"0.0","Name":"风速","Value":"0.0","Unit":"m/s","Fact04":"0.0","Name":"风向","Value":"0.0","Unit":"度","Fact05":"0.0","Name":"大气压","Value":"0.0","Unit":"HPa","Fact12":"0.0","Name":"大气温度","Value":"0.0","Unit":"℃","Fact13":"0.0","Name":"大气湿度","Value":"0.0","Unit":"%","Fact20":"7.0","Name":"PM2.5","Value":"7.0","Unit":"ug/m3","Fact21":"10.0","Name":"PM10","Value":"10.0","Unit":"ug/m3","Fact28":"29.0","Name":"噪声","Value":"29.0","Unit":"dB","Fact29":"37.0","Name":"扬尘","Value":"37.0","Unit":"ug/m3"}]}

JSON说明

total	总行数
rows	数据内容 	
ddate	数据日期(yyyy-MM-dd)	dtime 数据时间(HH:mm:ss)
Fact01	第一个监测因子监测数据	Name 第一个监测因子名称(重复) 	Value 第一个监测因子数据(重复)	Unit 第一个监测因子单位(重复)
Fact02	第二个监测因子监测数据 	Name 第二个监测因子名称(重复) 	Value 第二个监测因子数据(重复) 	Unit 第二个监测因子单位(重复)
Fact03	第三个监测因子监测数据 	Name 第三个监测因子名称(重复) 	Value 第三个监测因子数据(重复) 	Unit 第三个监测因子单位(重复)
……
Fact09	第九个监测因子监测数据 	Name 第九个监测因子名称(重复) 	Value 第九个监测因子数据(重复) 	Unit 第九个监测因子单位(重复)
Fact10	第十个监测因子监测数据 	Name 第十个监测因子名称(重复) 	Value 第十个监测因子数据(重复) 	Unit 第十个监测因子单位(重复)
……
Fact99	第99个监测因子监测数据 	Name 第99个监测因子名称(重复) 	Value 第99个监测因子数据(重复) 	Unit 第99个监测因子单位(重复)
 

视频设备列表

URL

/videosJson.action?sid=SID&key=KEY

JSON内容示例

[{"vid":345,"time":"2018-08-13 00:00:00","title":"深圳市鸿力健混凝土有限公司","number":"C16112452","descript":"","src":"rtmp://rtmp.open.ys7.com/openlive/84fd4117f4e846c19ca633d4396e2e1e.hd","stationid":162,"userid":1}]

JSON说明

vid		设备编号
time		安装时间
title		设备名称
number		摄像头序列号
descript	备注描述
src		直播地址
stationid	归属站点编号
userid		添加用户的ID
 

实时数据传输统计

URL

/realDataStatisticJson.action?sid=SID&did=DID&st=1538323200&et=1551345549&key=KEY

JSON内容示例

{"counter":125813,"normal":125813,"alarmer":0}

JSON说明

counter		时间内的总条数 
normal		时间内 不超上下限数据条数
alarmer		时间内超上下限 的数据条数