> ## Documentation Index
> Fetch the complete documentation index at: https://docs.der-connect.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate aggregations for an Entity

> Returns a page of raw data Aggregations, statistically averaged over a specified resolution and time period, with optional filtering



## OpenAPI

````yaml get /v1/entities/{entityId}/aggregations
openapi: 3.0.4
info:
  title: Connect Readings API
  description: Provides endpoints to get entity readings.
  version: '1.0'
servers:
  - url: https://api.traxes.io/connect
security:
  - bearerAuth: []
tags:
  - name: Readings
    description: Access Readings
  - name: Aggregations
    description: Access Aggregations
  - name: Statistics
    description: Access Statistics
paths:
  /v1/entities/{entityId}/aggregations:
    get:
      tags:
        - Aggregations
      summary: Retrieve Aggregations
      description: >-
        Returns a page of raw data Aggregations, statistically averaged over a
        specified resolution and time period, with optional filtering
      operationId: get-getaggregationsasync
      parameters:
        - name: entityId
          in: path
          description: The id of the Entity
          required: true
          schema:
            type: string
            format: uuid
          example: 8667fb97-68f2-485a-87c7-f3bdfa9482e1
        - name: start
          in: query
          description: The start of the overall time frame
          required: true
          schema:
            type: string
            format: date-time
          example: '2024-05-27 13:00:00Z'
        - name: resolution
          in: query
          description: >-
            The granularity or level of detail at which data points are combined
            or summarized. It determines the size of the time intervals over
            which data is aggregated.
                        
                         Provided as a time interval.
                         
                         Valid examples: '15 minutes', '30 minutes', '1 hour(s)', '2 day(s)', '2 weeks', '5 years'
                         Invalid examples: '1 month 3 days', '2 month 3 weeks'
                        
                         Intervals are aligned
                         - to midnight on January 3, 2000, for intervals that don't include a month or year
                         - to midnight on January 1, 2000, for month, year intervals
          required: true
          schema:
            type: string
          example: 15 minutes
        - name: end
          in: query
          description: The end of the overall time frame
          schema:
            type: string
            format: date-time
          example: '2024-05-28 13:00:00Z'
        - name: pageSize
          in: query
          description: The number of Aggregations per page
          schema:
            type: integer
            format: int32
            default: 25
        - name: continuationToken
          in: query
          description: The token used to retrieve the next page
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Connect.Service.Reading.Api.Models.V1.PagedAggregations
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Connect.Errors.Results.ConnectApiErrorResult
components:
  schemas:
    Connect.Service.Reading.Api.Models.V1.PagedAggregations:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: >-
              #/components/schemas/Connect.Service.Reading.Api.Models.V1.Aggregation
          description: The data for the paged response
          nullable: true
        links:
          $ref: '#/components/schemas/Connect.Models.Links'
        meta:
          $ref: '#/components/schemas/Connect.Models.Meta'
      additionalProperties: false
      description: A page of aggregations.
    Connect.Errors.Results.ConnectApiErrorResult:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Connect.Errors.Results.ConnectApiError'
          nullable: true
      additionalProperties: false
    Connect.Service.Reading.Api.Models.V1.Aggregation:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/Connect.Service.Reading.Api.Models.V1.Data.AggregationData
        entityId:
          type: string
          description: The id of the Entity
          format: uuid
        id:
          type: string
          description: The id of the aggregation.
          format: uuid
        timeframe:
          $ref: '#/components/schemas/Connect.Service.Reading.Core.Models.Timeframe'
      additionalProperties: false
      description: An aggregation.
    Connect.Models.Links:
      type: object
      properties:
        next:
          type: string
          description: The link to the next page of the paged response
          nullable: true
      additionalProperties: false
      description: The links for a paged response
    Connect.Models.Meta:
      type: object
      properties:
        continuationToken:
          type: string
          description: The continuation token used for paging
          nullable: true
        pageSize:
          type: integer
          description: The page size
          format: int32
      additionalProperties: false
      description: Represents meta data for a paged response
    Connect.Errors.Results.ConnectApiError:
      type: object
      properties:
        code:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
      additionalProperties: false
    Connect.Service.Reading.Api.Models.V1.Data.AggregationData:
      type: object
      properties:
        negativeActiveEnergy:
          $ref: >-
            #/components/schemas/Connect.Service.Reading.Api.Models.V1.Data.TieredMeasurement
        negativeGasVolume:
          $ref: >-
            #/components/schemas/Connect.Service.Reading.Api.Models.V1.Data.Measurement
        positiveActiveEnergy:
          $ref: >-
            #/components/schemas/Connect.Service.Reading.Api.Models.V1.Data.TieredMeasurement
        positiveGasVolume:
          $ref: >-
            #/components/schemas/Connect.Service.Reading.Api.Models.V1.Data.Measurement
      additionalProperties: false
      description: The data of an aggregation.
    Connect.Service.Reading.Core.Models.Timeframe:
      required:
        - end
        - start
      type: object
      properties:
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
      additionalProperties: false
    Connect.Service.Reading.Api.Models.V1.Data.TieredMeasurement:
      required:
        - total
        - unit
      type: object
      properties:
        t1:
          type: number
          description: The value for tier one.
          format: double
          nullable: true
        t2:
          type: number
          description: The value for tier two.
          format: double
          nullable: true
        t3:
          type: number
          description: The value for tier three.
          format: double
          nullable: true
        t4:
          type: number
          description: The value for tier four.
          format: double
          nullable: true
        total:
          type: number
          description: The total value.
          format: double
        unit:
          type: string
          description: The unit.
          nullable: true
      additionalProperties: false
      description: A tiered measurement.
    Connect.Service.Reading.Api.Models.V1.Data.Measurement:
      required:
        - unit
        - value
      type: object
      properties:
        unit:
          type: string
          description: The unit.
          nullable: true
        value:
          type: number
          description: The value.
          format: double
      additionalProperties: false
      description: A measurement.
  securitySchemes:
    bearerAuth:
      type: http
      description: Access Token Authentication
      scheme: bearer
      bearerFormat: JWT

````