怎么從你們云平臺網(wǎng)站調(diào)取數(shù)據(jù)?API接口協(xié)議是怎樣的?
來源:綿陽湘蜀電子科技有限公司
|
作者:Veinasa
|
發(fā)布時(shí)間: 2016-10-01
|
4686 次瀏覽
|
分享到:
各個(gè)用戶的需求不同,我們許多中間商、渠道商已經(jīng)擁有自己的數(shù)據(jù)管理平臺,又或者需要和自己平臺數(shù)據(jù)交互等原因往往需要從我們云平臺調(diào)取數(shù)據(jù),這里我們也應(yīng)運(yùn)提供實(shí)時(shí)數(shù)據(jù)庫調(diào)取功能,下單前需要和銷售人員說明書開通平臺數(shù)據(jù)調(diào)取功能才可以調(diào)取數(shù)據(jù)
接口地址:http://xsdz.veinasa.cn/intfa/queryData/16****14
“16****14”為設(shè)備唯一ID號,
這里提供給大家一個(gè)公司測試設(shè)備ID號,16060478,(諸位用戶可以在自己設(shè)備主機(jī)上找到自己的ID.)
即訪問:http://xsdz.veinasa.cn/intfa/queryData/16060478 即可得到此設(shè)備的實(shí)時(shí)數(shù)據(jù)。
數(shù)據(jù)類型:數(shù)據(jù)接口可以返回多種數(shù)據(jù)類型,默認(rèn)返回XML,如果想要返回json數(shù)據(jù),只需在接口地址指定json輸出即可
例如:
http://xsdz.veinasa.cn/intfa/queryData/16****14.json 返回json數(shù)據(jù)
http://xsdz.veinasa.cn/intfa/queryData/16****14.xml 返回xml數(shù)據(jù)
數(shù)據(jù)返回結(jié)果(以JSON格式為例):
{
"statusCode":"200",
"message":"數(shù)據(jù)下載成功!",
"navTabId":"",
"rel":"","callbackType":"closeCurrent",
"forwardUrl":null,
"type":"class cn.ys.common.web.HtmlMessage",
"entity":[{
"eName":"風(fēng)速",
"eKey":"e1",
"eNum":"108",
"eUnit":"m/s",
"eValue":"0.0"
},{
"datetime":"2018-10-26 10:05:05",
"eName":"雨量",
"eKey":"e2",
"eNum":"104",
"eUnit":"mm",
"eValue":"0.0"
},{
"datetime":"2018-10-26 10:05:05",
"eName":"雨量累計(jì)",
"eKey":"e3",
"eNum":"115",
"eUnit":"mm",
"eValue":"0.0"
},{
"datetime":"2018-10-26 10:05:05",
"eName":"土壤溫度",
"eKey":"e4",
"eNum":"106",
"eUnit":"℃","eValue":"0"
},{
"datetime":"2018-10-26 10:05:05",
"eName":"大氣溫度",
"eKey":"e5",
"eNum":"101",
"eUnit":"℃",
"eValue":"0"
},{
"datetime":"2018-10-26 10:05:05",
"eName":"大氣濕度",
"eKey":"e6",
"eNum":"102",
"eUnit":"%RH",
"eValue":"0"
},{
"datetime":"2018-10-26 10:05:05",
"eName":"風(fēng)向",
"eKey":"e7",
"eNum":"109",
"eUnit":"°",
"eValue":"0.0"
},{
"datetime":"2018-10-26 10:05:05",
"eName":"土壤濕度",
"eKey":"e8",
"eNum":"107",
"eUnit":"%RH",
"eValue":"0.0"
},{
"datetime":"2018-10-26 10:05:05",
"eName":"二氧化碳",
"eKey":"e10",
"eNum":"120",
"eUnit":"PPM",
"eValue":"0"
}
]
}
數(shù)據(jù)說明:
“16****14”為設(shè)備唯一ID號,下單前需要和銷售人員說明書開通平臺數(shù)據(jù)調(diào)取功能才可以調(diào)取數(shù)據(jù)
如果數(shù)據(jù)查詢成功,statusCode為200,statusCode為其它表示查詢失敗
entity里面返回?cái)?shù)據(jù)結(jié)果
eUnit:數(shù)據(jù)單位
eValue:數(shù)據(jù)結(jié)果
eKey:通道編號
eName:通道名稱
eNum:通道對應(yīng)編碼
eKey:通道編號
eName:通道名稱
eNum:通道對應(yīng)編碼