GET /api/external/v2/statistics/bylevel/{level}/updatedAfter/{updatedAfter}/groupbymedia

Get monthly statistics data of any time period and for a certain level in the structure that has one or more media types that are updated after a certain date. The result includes only media types for each structure item that have been updated. For a full set of statistics for each item, please use the end points where you can specify a date interval instead. The statistics are grouped by media type.

Request Information

Permissions

The user must be authorized.

Embeded Resource Parameters

None

URI Parameters

NameDescriptionTypeAdditional information
level

The level in the structure to get statistics for. Valid values are "R" for divisions, "E" for estates, "B" for buildings and "A" for tenants. "E" and "B" are mandatory in Momentum Energi, but "R" and "A" are optional and therefor may need to be configured.

string

Required

updatedAfter

Get only statistics data that are updated after this date. Valid format is YYYY-MM-DD.

date

Required

Body Parameters

None.

Response Information

Resource Description

A list with all statistics data if any, otherwise empty list

DataResultOfUGStatisticsDto
NameDescriptionTypeAdditional information
Data

Collection of UGStatisticsDto

None.

Total

integer

None.

Take

integer

None.

Skip

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "data": [
    {
      "itemKey": "sample string 1",
      "usageType": "sample string 2",
      "mediaClass": "sample string 3",
      "mediaType": "sample string 4",
      "startDate": "2024-04-19T06:43:37.3490261+02:00",
      "stopDate": "2024-04-19T06:43:37.3490261+02:00",
      "consumptionUnit": "sample string 7",
      "consumption": 1.1,
      "consumptionNormalized": 1.1,
      "energyUnit": "sample string 8",
      "energy": 1.1,
      "energyNormalized": 1.1,
      "lastUpdated": "2024-04-19T06:43:37.3490261+02:00"
    },
    {
      "itemKey": "sample string 1",
      "usageType": "sample string 2",
      "mediaClass": "sample string 3",
      "mediaType": "sample string 4",
      "startDate": "2024-04-19T06:43:37.3490261+02:00",
      "stopDate": "2024-04-19T06:43:37.3490261+02:00",
      "consumptionUnit": "sample string 7",
      "consumption": 1.1,
      "consumptionNormalized": 1.1,
      "energyUnit": "sample string 8",
      "energy": 1.1,
      "energyNormalized": 1.1,
      "lastUpdated": "2024-04-19T06:43:37.3490261+02:00"
    }
  ],
  "total": 1,
  "take": 2,
  "skip": 3
}