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

# Get Intervals by Connection (BETA)

> Retrieve interval data associated with a specified utility connection. The data is paginated, with default of 100 entries per page. Users must have access to the connection to retrieve this data.

**BETA**: This endpoint is currently in BETA and is only available for Comed (60 min), AEP (15 min), Dominion (30 min), PPL (15 min), PSEG (30 min), and BGE (60 min) utilities.



## OpenAPI

````yaml /api-reference/openapi-v2-2.json get /interval/connection/{connection_id}
openapi: 3.1.0
info:
  title: Nectar API Documentation
  version: 1.0.0 (v1)
  description: >-
    Complete API documentation for v2.2 endpoints to managing companies, sites,
    data, and documents
servers:
  - url: https://external.nectarclimate.com/v2.2
    description: Nectar API Server
security: []
paths:
  /interval/connection/{connection_id}:
    get:
      tags:
        - Intervals
      summary: Get Intervals by Connection (BETA)
      description: >-
        Retrieve interval data associated with a specified utility connection.
        The data is paginated, with default of 100 entries per page. Users must
        have access to the connection to retrieve this data.


        **BETA**: This endpoint is currently in BETA and is only available for
        Comed (60 min), AEP (15 min), Dominion (30 min), PPL (15 min), PSEG (30
        min), and BGE (60 min) utilities.
      operationId: interval_connection_retrieve
      parameters:
        - in: query
          name: account
          schema:
            type: string
            format: uuid
          description: >-
            Optional account UUID. If provided, only intervals associated with
            that account are returned.
        - in: path
          name: connection_id
          schema:
            type: string
            format: uuid
          description: ID of the utility connection for which to retrieve interval data.
          required: true
        - in: query
          name: datasourceType
          schema:
            type: array
            items:
              enum:
                - ELECTRICITY
                - GAS
                - WATER
                - DISTRICT
                - WASTE
                - FUEL
                - MISC
                - REFRIGERANT
                - SOLAR
                - TELECOM
              type: string
              description: |-
                * `ELECTRICITY` - Electricity
                * `GAS` - Gas
                * `WATER` - Water
                * `DISTRICT` - District
                * `WASTE` - Waste
                * `FUEL` - Fuel
                * `MISC` - Misc
                * `REFRIGERANT` - Refrigerant
                * `SOLAR` - Solar
                * `TELECOM` - Telecom
            default:
              - MISC
              - ELECTRICITY
              - GAS
              - REFRIGERANT
              - DISTRICT
              - TELECOM
              - WATER
              - FUEL
              - WASTE
              - SOLAR
          description: >-
            ('Optional. List of datasource types to filter by. If not provided,
            includes all types. Must be a sublist of `"ELECTRICITY"`, `"GAS"`,
            `"WATER"`, `"DISTRICT"`, `"WASTE"`, `"FUEL"`, `"MISC"`,
            `"REFRIGERANT"`, `"SOLAR"`, `"TELECOM"`',)
        - in: query
          name: endDate
          schema:
            type: string
            format: date-time
          description: >-
            Optional end time for interval data in ISO 8601 format (e.g.,
            2024-01-31T23:59:59Z). If provided, filters for intervals ending on
            or before this timestamp.
        - in: query
          name: identifier
          schema:
            type: string
            minLength: 1
            default: ''
          description: Filter meters by identifier value. Searches across all identifiers.
        - in: query
          name: page
          schema:
            type: integer
            default: 1
          description: Page number for paginated results. Default is 1.
        - in: query
          name: startDate
          schema:
            type: string
            format: date-time
          description: >-
            Optional start time for interval data in ISO 8601 format (e.g.,
            2024-01-01T00:00:00Z). If provided, filters for intervals starting
            on or after this timestamp.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntervalPaginated'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
        '403':
          description: 'Forbidden: Access to the connection is denied.'
        '404':
          description: Connection not found.
      security:
        - ExternalAuthentication: []
components:
  schemas:
    IntervalPaginated:
      type: object
      description: Serializer for paginated interval response.
      properties:
        totalIntervals:
          type: integer
          description: Total number of intervals.
        perPage:
          type: integer
          description: Number of entries per page.
        totalPages:
          type: integer
          description: Total number of pages.
        currentPage:
          type: integer
          description: Current page number.
        hasNext:
          type: boolean
          description: Indicates if there is a next page.
        hasPrevious:
          type: boolean
          description: Indicates if there is a previous page.
        intervals:
          type: array
          items:
            $ref: '#/components/schemas/Interval'
          description: List of interval data entries.
      required:
        - currentPage
        - hasNext
        - hasPrevious
        - intervals
        - perPage
        - totalIntervals
        - totalPages
    ErrorResponse:
      type: object
      description: Serializer for error responses.
      properties:
        detail:
          type: string
        error:
          type: string
    Interval:
      type: object
      description: Serializer for interval data objects.
      properties:
        id:
          type: string
          format: uuid
          description: UUID of the interval.
        created:
          type: string
          format: date-time
          description: Timestamp when the interval was created.
        updated:
          type: string
          format: date-time
          description: Timestamp when the interval was last updated.
        identifiers:
          type: array
          items:
            $ref: '#/components/schemas/IdentifierSkeletonSerializerV2'
          description: Identifiers associated with the interval.
        account:
          type: string
          format: uuid
          description: Account UUID associated with the interval.
        start:
          type: string
          format: date-time
          description: Start timestamp for the interval.
        end:
          type: string
          format: date-time
          description: End timestamp for the interval.
        usage:
          type: string
          format: decimal
          pattern: ^-?\d{0,10}(?:\.\d{0,10})?$
          description: Usage value measure over the interval.
        usageUnits:
          allOf:
            - $ref: '#/components/schemas/IntervalUsageUnitsEnum'
          description: >-
            Units of the interval reading. Electricity energy (Wh/kWh/...) or
            demand (kW/kVA/kVAR/...).


            * `Wh` - Wh

            * `kWh` - Kwh

            * `MWh` - Mwh

            * `GWh` - Gwh

            * `kVAh` - Kvah

            * `MVAh` - Mvah

            * `GVAh` - Gvah

            * `kVArh` - Kvarh

            * `MVArh` - Mvarh

            * `GVArh` - Gvarh

            * `W` - W

            * `kW` - Kw

            * `MW` - Mw

            * `GW` - Gw

            * `kVA` - Kva

            * `MVA` - Mva

            * `GVA` - Gva

            * `kVAR` - Kvar

            * `MVAR` - Mvar

            * `GVAR` - Gvar
        quality:
          allOf:
            - $ref: '#/components/schemas/QualityEnum'
          description: |-
            Settle ment quality of the interval data.

            * `FINAL` - Final
            * `PRELIMINARY` - Preliminary
            * `ESTIMATED` - Estimated
      required:
        - account
        - created
        - end
        - id
        - identifiers
        - start
        - usage
        - usageUnits
    IdentifierSkeletonSerializerV2:
      type: object
      description: Serializer for all fields of Identifier, used in usage endpoints.
      properties:
        name:
          type:
            - string
            - 'null'
          description: Name of the identifier.
        rawName:
          type: string
          description: Raw name of the identifier as found in the document.
          maxLength: 200
        value:
          type: string
          description: Value of the identifier.
          maxLength: 200
      required:
        - rawName
        - value
    IntervalUsageUnitsEnum:
      enum:
        - Wh
        - kWh
        - MWh
        - GWh
        - kVAh
        - MVAh
        - GVAh
        - kVArh
        - MVArh
        - GVArh
        - W
        - kW
        - MW
        - GW
        - kVA
        - MVA
        - GVA
        - kVAR
        - MVAR
        - GVAR
      type: string
      description: |-
        * `Wh` - Wh
        * `kWh` - Kwh
        * `MWh` - Mwh
        * `GWh` - Gwh
        * `kVAh` - Kvah
        * `MVAh` - Mvah
        * `GVAh` - Gvah
        * `kVArh` - Kvarh
        * `MVArh` - Mvarh
        * `GVArh` - Gvarh
        * `W` - W
        * `kW` - Kw
        * `MW` - Mw
        * `GW` - Gw
        * `kVA` - Kva
        * `MVA` - Mva
        * `GVA` - Gva
        * `kVAR` - Kvar
        * `MVAR` - Mvar
        * `GVAR` - Gvar
    QualityEnum:
      enum:
        - FINAL
        - PRELIMINARY
        - ESTIMATED
      type: string
      description: |-
        * `FINAL` - Final
        * `PRELIMINARY` - Preliminary
        * `ESTIMATED` - Estimated
  securitySchemes:
    ExternalAuthentication:
      type: apiKey
      in: header
      name: X-API-KEY

````