> ## 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 device disruptions

> Returns disruption history (power outage and restoration events) for a specific device. This endpoint provides paginated access to status change events.



## OpenAPI

````yaml GET /devices/{deviceId}/disruption
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}/disruption:
    get:
      description: >-
        Returns disruption history (power outage and restoration events) for a
        specific device. This endpoint provides paginated access to status
        change events.
      parameters:
        - name: deviceId
          in: path
          required: true
          description: The device ID or alias
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of results to return (max 200)
          schema:
            type: integer
            format: int32
            maximum: 200
        - name: page
          in: query
          description: Page number for pagination
          schema:
            type: integer
            format: int32
        - name: startDate
          in: query
          description: Start date for data retrieval (ISO 8601 format)
          schema:
            type: string
            format: date-time
        - name: endDate
          in: query
          description: End date for data retrieval (ISO 8601 format)
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Device disruptions retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisruptionResponse'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    DisruptionResponse:
      type: object
      properties:
        message:
          type: string
          description: Response message
          example: Device disruptions retrieved
        data:
          type: array
          items:
            $ref: '#/components/schemas/DisruptionEvent'
          description: Array of disruption/restoration events
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    DisruptionEvent:
      type: object
      properties:
        deviceId:
          description: Unique device Id
          type: string
        status:
          type: integer
          description: >-
            Status of the device; 0 for power off (disruption), 1 for power on
            (restoration)
        deviceTime:
          type: string
          format: date-time
          description: Timestamp from the device when the event occurred (ISO 8601 format)
        createdAt:
          description: Timestamp showing when the event was recorded in the system
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````