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

# Get today device insights

> Returns real-time insights and analytics for the current day for a specific device. Provides live metrics including uptime, downtime, consumption, and reliability calculated from midnight to current time in the device's timezone.



## OpenAPI

````yaml GET /devices/{deviceId}/today
openapi: 3.0.1
info:
  title: Electra API
  description: Electra public API documentation
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.electra.systems/v1/public
security:
  - bearerAuth: []
paths:
  /devices/{deviceId}/today:
    get:
      description: >-
        Returns real-time insights and analytics for the current day for a
        specific device. Provides live metrics including uptime, downtime,
        consumption, and reliability calculated from midnight to current time in
        the device's timezone.
      parameters:
        - name: deviceId
          in: path
          required: true
          description: The device ID or alias
          schema:
            type: string
      responses:
        '200':
          description: Today data retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TodayInsightsResponse'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Device not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    TodayInsightsResponse:
      type: object
      properties:
        message:
          type: string
          description: Response message
          example: Today data retrieved
        data:
          $ref: '#/components/schemas/TodayInsights'
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    TodayInsights:
      type: object
      properties:
        uptime:
          type: number
          description: Total uptime in seconds for today
        downtime:
          type: number
          description: Total downtime in seconds for today
        uptimeCount:
          type: integer
          description: Number of times power was restored today
        downtimeCount:
          type: integer
          description: Number of power outages today
        longestSupply:
          type: number
          description: Longest continuous power supply duration in seconds
        longestOutage:
          type: number
          description: Longest continuous power outage duration in seconds
        consumption:
          type: number
          description: Energy consumption in kilowatt-hours (kWh) for today
        peakLoad:
          type: object
          properties:
            value:
              type: number
              description: Peak power load in kilowatts (kW)
            time:
              type: string
              format: date-time
              description: Timestamp when peak load occurred
        averageLoad:
          type: number
          description: Average power load in kilowatts (kW) for today
        days:
          type: number
          description: Hours elapsed since midnight
        cost:
          type: number
          description: Cost of energy consumption based on device tariff
        reliability:
          type: number
          description: Reliability percentage (uptime/total time * 100)
        tariff:
          type: number
          nullable: true
          description: Energy tariff rate for the device
        isDeviceOwner:
          type: boolean
          description: Indicates if the requesting user is the device owner
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````