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

# Get Devices Pv Control Flex Logs

> Get a list of logs that contain the executed flex commands for a specific energy supplier over
a time range.



## OpenAPI

````yaml /api-docs/pv/openapi-pv.json get /v1/devices/pv/flex/logs
openapi: 3.1.0
info:
  title: NOX Energy API - PV
  description: >
    # PV API Documentation


    This documentation shows only the endpoints available to pv users.


    ## Authentication


    1. Get your API key from [NOX Energy](mailto:support@nox.energy).

    2. Include the API key in your API calls with the header: `x-api-key:
    YOUR_API_KEY`.


    ## Access Level


    This documentation is specifically for **pv users** who have access to these
    endpoints.


    Base URL: [https://api.nox.energy](https://api.nox.energy)
  version: 1.0.0
servers:
  - url: https://api.nox.energy
    description: Production Server
security:
  - ApiKeyAuth: []
tags:
  - name: Asset Info
    description: API to get basic information about your assets.
  - name: User Management
    description: API endpoints to manage users and their data.
paths:
  /v1/devices/pv/flex/logs:
    get:
      tags:
        - PV Control
      summary: Get Devices Pv Control Flex Logs
      description: >-
        Get a list of logs that contain the executed flex commands for a
        specific energy supplier over

        a time range.
      operationId: get_devices_pv_control_flex_logs_v1_devices_pv_flex_logs_get
      parameters:
        - name: start_time
          in: query
          required: true
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: |

              Start time when the consumption measurement were taken.
              The time is in UTC in ISO 8601 format.



              Time format examples:
              - 2023-10-01T00:00:00Z
              - 2023-10-01T00:00:00
            title: Start Time
          description: |

            Start time when the consumption measurement were taken.
            The time is in UTC in ISO 8601 format.



            Time format examples:
            - 2023-10-01T00:00:00Z
            - 2023-10-01T00:00:00
        - name: end_time
          in: query
          required: true
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: |

              End time when the consumption measurement were taken.
              The time is in UTC in ISO 8601 format.



              Time format examples:
              - 2023-10-01T00:00:00Z
              - 2023-10-01T00:00:00
            title: End Time
          description: |

            End time when the consumption measurement were taken.
            The time is in UTC in ISO 8601 format.



            Time format examples:
            - 2023-10-01T00:00:00Z
            - 2023-10-01T00:00:00
      responses:
        '200':
          description: Successful response for get hp current telemetry endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DevicesPVFlexLogsResponse'
              example:
                data:
                  - timestamp: '2026-04-17T09:27:09.224000+00:00'
                    control_type: production_curtailment
                    target_percentage: 0
                    brand_filter:
                      - Sma
                      - Solis
                    executed_flex_device_count: 42
                    end_time: '2026-04-17T10:27:09.224000+00:00'
                meta:
                  energy_supplier: Energy Supplier A
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DevicesPVFlexLogsResponse:
      properties:
        data:
          anyOf:
            - items:
                $ref: '#/components/schemas/DevicesPVFlexLogsDataResponse'
              type: array
            - type: 'null'
          title: Data
          description: List of devices flex logs.
        meta:
          $ref: '#/components/schemas/DevicesPVFlexMeta'
          description: Response metadata.
      type: object
      required:
        - meta
      title: DevicesPVFlexLogsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DevicesPVFlexLogsDataResponse:
      properties:
        timestamp:
          anyOf:
            - type: string
            - type: 'null'
          title: Timestamp
          description: Timestamp of the flex log entry in ISO 8601 format in UTC.
        control_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Control Type
          description: Type of control applied, e.g. 'production_curtailment'.
        target_kw:
          anyOf:
            - type: number
            - type: 'null'
          title: Target Kw
          description: Target power in kW to reduce production with.
        target_percentage:
          anyOf:
            - type: number
              maximum: 100
              minimum: 0
            - type: 'null'
          title: Target Percentage
          description: Target percentage of max capacity to reduce production with.
        brand_filter:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Brand Filter
          description: >-
            Filter devices by brands. If not provided, all brands will be
            considered.
        executed_flex_device_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Executed Flex Device Count
          description: Number of devices that executed the flex request.
        end_time:
          anyOf:
            - type: string
            - type: 'null'
          title: End Time
          description: >-
            End time for the flex request in ISO 8601 format in UTC. If not
            provided, the flex request will be applied indefinitely until a new
            request is made.
      type: object
      title: DevicesPVFlexLogsDataResponse
    DevicesPVFlexMeta:
      properties:
        energy_supplier:
          type: string
          title: Energy Supplier
          description: The energy supplier associated with the PV flex request.
      type: object
      required:
        - energy_supplier
      title: DevicesPVFlexMeta
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 'API Key authentication. Enter your API key in the format: YOUR_API_KEY'

````