获取能耗趋势
开发中
POST
http://prod-cn.your-api-server.com/api/open/bems/data-view/v1/energy-trend/trend
最后修改时间:2024-11-11 02:50:21
责任人:未设置
请求参数
Query 参数
project
string
可选
默认值:
1192410229407772672
instance
string
实例
Header 参数
Authorization
string
可选
默认值:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXJ2ZXIiOmZhbHNlLCJzdWIiOiIxNzQzMDg0NTg3MjY0ODE5MjAxIiwiZmxhZyI6NiwiY2xpZW50VHlwZSI6bnVsbCwidXNlcl9uYW1lIjoiMTM3NjIyMzIwMDciLCJzY29wZSI6WyJzZXZlciJdLCJuYW1lIjoiMTM3NjIyMzIwMDciLCJleHAiOjE3MjA1OTcyMzAsImp0aSI6ImE5NjIxN2NiLTBiZDUtNGE1YS1iNmMzLWY1YTVlMjY3ZDIyMSIsInRlbmFudCI6InQxNzQzMDg0NTg3Mjc3NDAyMTEzIiwiY2xpZW50X2lkIjoic3lzIn0.5UPL14t8CI7oySNuurTwkWaob9HstDEILr6bpWb16QU
Body 参数application/json
energyObjs
array [object {5}]
必需
objectId
string
对象id
gradationId
string
必需
name
string
当前对象或层级名称
pathName
string
路径名称
dimensionId
string
必需
offset
integer
时区,传8
startTime
integer
开始时间
endTime
integer
结束时间
dataGranularity
string
必需
energyConversion
string
能源折算,0 用量
energyTypeId
string
能源类型id
energyTypeCode
string
能源类型编码
dimensionId
string
必需
示例
{
"energyObjs": [
{
"objectId": "1203004470997438464",
"gradationId": "1203005280921735168",
"name": "空调冷站用电",
"pathName": "达实大厦/空调冷站用电",
"dimensionId": "1203005192723910656"
}
],
"offset": 8,
"startTime": 1730736000000,
"endTime": 1731254400000,
"dataGranularity": "HOUR",
"energyConversion": "0",
"energyTypeId": "1210219922706022400",
"energyTypeCode": "01",
"dimensionId": "1203005192723910656"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://prod-cn.your-api-server.com/api/open/bems/data-view/v1/energy-trend/trend?project=1192410229407772672&instance=' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXJ2ZXIiOmZhbHNlLCJzdWIiOiIxNzQzMDg0NTg3MjY0ODE5MjAxIiwiZmxhZyI6NiwiY2xpZW50VHlwZSI6bnVsbCwidXNlcl9uYW1lIjoiMTM3NjIyMzIwMDciLCJzY29wZSI6WyJzZXZlciJdLCJuYW1lIjoiMTM3NjIyMzIwMDciLCJleHAiOjE3MjA1OTcyMzAsImp0aSI6ImE5NjIxN2NiLTBiZDUtNGE1YS1iNmMzLWY1YTVlMjY3ZDIyMSIsInRlbmFudCI6InQxNzQzMDg0NTg3Mjc3NDAyMTEzIiwiY2xpZW50X2lkIjoic3lzIn0.5UPL14t8CI7oySNuurTwkWaob9HstDEILr6bpWb16QU' \
--header 'Content-Type: application/json' \
--data-raw '{
"energyObjs": [
{
"objectId": "1203004470997438464",
"gradationId": "1203005280921735168",
"name": "空调冷站用电",
"pathName": "达实大厦/空调冷站用电",
"dimensionId": "1203005192723910656"
}
],
"offset": 8,
"startTime": 1730736000000,
"endTime": 1731254400000,
"dataGranularity": "HOUR",
"energyConversion": "0",
"energyTypeId": "1210219922706022400",
"energyTypeCode": "01",
"dimensionId": "1203005192723910656"
}'
返回响应
🟢200成功
application/json
Body
lineCharts
array [object {9}]
必需
startTime
integer
开始时间
endTime
integer
结束时间
currentValue
integer
当前值
yoyStartTime
integer
同比开始时间
yoyEndTime
integer
同比结束时间
yoyValue
integer
同比值
ratioStartTime
integer
环比开始时间
ratioEndTime
integer
环比结束时间
ratioValue
integer
环比值
dataGranularity
null
当前数据颗粒度
objectName
string
对象名称
energyTypeName
string
能源类型
energyUnit
string
能源单位
yearOrYearValue
integer
上年同比用量
yearOrYearPercentage
number
必需
ratioValue
integer
上期环比用 量
ratioPercentage
integer
必需
statisticsValue
integer
统计值
maxValue
integer
最大值
minValue
integer
最小值
averageValue
number
平均值
示例
{
"lineCharts": [
{
"startTime": 1731254400000,
"endTime": 1731258000000,
"currentValue": 25,
"yoyStartTime": 1699632000000,
"yoyEndTime": 1699635600000,
"yoyValue": 115,
"ratioStartTime": 1731168000000,
"ratioEndTime": 1731171600000,
"ratioValue": 26,
"deviceId": ""
},
{
"startTime": 1731258000000,
"endTime": 1731261600000,
"currentValue": 27,
"yoyStartTime": 1699635600000,
"yoyEndTime": 1699639200000,
"yoyValue": 112,
"ratioStartTime": 1731171600000,
"ratioEndTime": 1731175200000,
"ratioValue": 25,
"deviceId": ""
},
{
"startTime": 1731261600000,
"endTime": 1731265200000,
"currentValue": 25,
"yoyStartTime": 1699639200000,
"yoyEndTime": 1699642800000,
"yoyValue": 93,
"ratioStartTime": 1731175200000,
"ratioEndTime": 1731178800000,
"ratioValue": 28,
"deviceId": ""
},
{
"startTime": 1731265200000,
"endTime": 1731268800000,
"currentValue": 27,
"yoyStartTime": 1699642800000,
"yoyEndTime": 1699646400000,
"yoyValue": 94,
"ratioStartTime": 1731178800000,
"ratioEndTime": 1731182400000,
"ratioValue": 26,
"deviceId": ""
},
{
"startTime": 1731268800000,
"endTime": 1731272400000,
"currentValue": 24,
"yoyStartTime": 1699646400000,
"yoyEndTime": 1699650000000,
"yoyValue": 98,
"ratioStartTime": 1731182400000,
"ratioEndTime": 1731186000000,
"ratioValue": 25,
"deviceId": ""
},
{
"startTime": 1731272400000,
"endTime": 1731276000000,
"currentValue": 27,
"yoyStartTime": 1699650000000,
"yoyEndTime": 1699653600000,
"yoyValue": 93,
"ratioStartTime": 1731186000000,
"ratioEndTime": 1731189600000,
"ratioValue": 27,
"deviceId": ""
},
{
"startTime": 1731276000000,
"endTime": 1731279600000,
"currentValue": 93,
"yoyStartTime": 1699653600000,
"yoyEndTime": 1699657200000,
"yoyValue": 96,
"ratioStartTime": 1731189600000,
"ratioEndTime": 1731193200000,
"ratioValue": 45,
"deviceId": ""
},
{
"startTime": 1731279600000,
"endTime": 1731283200000,
"currentValue": 501,
"yoyStartTime": 1699657200000,
"yoyEndTime": 1699660800000,
"yoyValue": 202,
"ratioStartTime": 1731193200000,
"ratioEndTime": 1731196800000,
"ratioValue": 414,
"deviceId": ""
},
{
"startTime": 1731283200000,
"endTime": 1731286800000,
"currentValue": 413,
"yoyStartTime": 1699660800000,
"yoyEndTime": 1699664400000,
"yoyValue": 201,
"ratioStartTime": 1731196800000,
"ratioEndTime": 1731200400000,
"ratioValue": 169,
"deviceId": ""
},
{
"startTime": 1731286800000,
"endTime": 1731290400000,
"currentValue": 575,
"yoyStartTime": 1699664400000,
"yoyEndTime": 1699668000000,
"yoyValue": 246,
"ratioStartTime": 1731200400000,
"ratioEndTime": 1731204000000,
"ratioValue": 117,
"deviceId": ""
},
{
"startTime": 1731290400000,
"endTime": 1731294000000,
"currentValue": 295,
"yoyStartTime": 1699668000000,
"yoyEndTime": 1699671600000,
"yoyValue": 159,
"ratioStartTime": 1731204000000,
"ratioEndTime": 1731207600000,
"ratioValue": 75,
"deviceId": ""
}
],
"dataGranularity": null,
"objectName": "达实大厦/空调冷站用电",
"energyTypeName": "电",
"energyUnit": "kWh",
"yearOrYearValue": 1509,
"yearOrYearPercentage": 34.7,
"ratioValue": 977,
"ratioPercentage": 108,
"statisticsValue": 2032,
"maxValue": 575,
"minValue": 24,
"averageValue": 184.7
}
🟠400400响应结构

期待您的宝贵建议
微信扫描二维码,为我们的AIoT产品提出您的宝贵建议,用户体验是我们坚持不懈的追求。


修改于 2024-11-11 02:50:21