query statsTimeSeries($select: [TimeSeriesSelectInput!]!, $scope: StatsScopeInput!) { statsTimeSeries(select: $select, scope: $scope) { result { metadata { tag ref { timeSeriesId category homeId areaId deviceId } unit } values { timestamp values { tag value } } aggregates { tag sum } } errors { message path } } }
{ "select": [ { "tag": "Example String", "category": "ENERGY_CONSUMPTION", "homeId": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "areaId": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "deviceId": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "aggregateSum": true } ], "scope": { "rangeStart": "Example String", "rangeEnd": "Example String", "granularity": "HOURLY" } }
{ "data": { "result": { "metadata": [ { "tag": "Example String", "ref": { "timeSeriesId": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "category": "ENERGY_CONSUMPTION", "homeId": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "areaId": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "deviceId": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4" }, "unit": "CELSIUS" } ], "values": [ { "timestamp": 40, "values": [ { "tag": "Example String", "value": 40 } ] } ], "aggregates": [ { "tag": "Example String", "sum": 40 } ] }, "errors": [ { "message": "Example String", "path": "Example String" } ] } }