> ## 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 a total aggregation for an Entity

> Returns a single total Aggregation for an Entity between specific dates



## OpenAPI

````yaml get /v1/entities/{entityId}/aggregations/total
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/total:
    get:
      tags:
        - Aggregations
      summary: Retrieve the total Aggregation
      description: Returns a single total Aggregation for an Entity between specific dates
      operationId: get-gettotalaggregationasync
      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 time frame
          required: true
          schema:
            type: string
            format: date-time
          example: '2024-05-28 13:20:00Z'
        - name: end
          in: query
          description: The end of the time frame
          required: true
          schema:
            type: string
            format: date-time
          example: '2024-05-28 13:45:00Z'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Connect.Service.Reading.Api.Models.V1.Aggregation
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Connect.Errors.Results.ConnectApiErrorResult
components:
  schemas:
    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.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.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.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.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

````