> ## 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 Settings

> Get the settings of a specific pv device or of all pv devices of a user.
Provide either a `device_id` or a `user_id`.


 The following settings are returned:

 * `optimization_settings.pv_curtailment_mode`: `managed`, `external` or `off`.
 If `managed`, we optimize the pv curtailment.
 If `external`, we steer based on schedules provided by external parties like energy suppliers.
 If `off`, we will not curtail the pv.
 A device that has no settings stored yet is returned with the default `off`.

 * `updated_at`: the time the settings were last updated. `null` means we provide default values
 because the user has not yet updated their device settings.



## OpenAPI

````yaml /api-docs/pv/openapi-pv.json get /v1/devices/pv/settings
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/settings:
    get:
      tags:
        - User Management
      summary: Get Devices Pv Settings
      description: |-
        Get the settings of a specific pv device or of all pv devices of a user.
        Provide either a `device_id` or a `user_id`.


         The following settings are returned:

         * `optimization_settings.pv_curtailment_mode`: `managed`, `external` or `off`.
         If `managed`, we optimize the pv curtailment.
         If `external`, we steer based on schedules provided by external parties like energy suppliers.
         If `off`, we will not curtail the pv.
         A device that has no settings stored yet is returned with the default `off`.

         * `updated_at`: the time the settings were last updated. `null` means we provide default values
         because the user has not yet updated their device settings.
      operationId: get_devices_pv_settings_v1_devices_pv_settings_get
      parameters:
        - name: device_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >

              The ID of the device to filter on. If not provided, all devices
              are returned.
            title: Device Id
          description: >

            The ID of the device to filter on. If not provided, all devices are
            returned.
        - name: user_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >

              The ID of the user to filter on. If not provided, all users are
              returned.
            title: User Id
          description: >

            The ID of the user to filter on. If not provided, all users are
            returned.
      responses:
        '200':
          description: Successful response for get pv settings endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DevicesGetPVSettingsResponse'
              example:
                data:
                  - device_id: device_id_123
                    optimization_settings:
                      pv_curtailment_mode: managed
                  - device_id: device_id_456
                    optimization_settings:
                      pv_curtailment_mode: 'off'
                meta:
                  energy_supplier: Energy Supplier A
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DevicesGetPVSettingsResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/DevicePVSettings'
          type: array
          title: Data
          description: List of pv device settings
        meta:
          $ref: '#/components/schemas/DevicesGetPVSettingsMetadata'
          description: Metadata related to the pv device settings response
      type: object
      required:
        - data
        - meta
      title: DevicesGetPVSettingsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DevicePVSettings:
      properties:
        device_id:
          type: string
          title: Device Id
          description: Device ID the settings belong to
        optimization_settings:
          $ref: '#/components/schemas/PVOptimizationSettingsResponse'
          description: Optimization settings for the device
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
          description: >-
            Timestamp of the last update of the settings in ISO format. `null`
            means we provide default values because the user has not yet updated
            their device settings.
      type: object
      required:
        - device_id
        - optimization_settings
      title: DevicePVSettings
    DevicesGetPVSettingsMetadata:
      properties:
        energy_supplier:
          anyOf:
            - type: string
            - type: 'null'
          title: Energy Supplier
          description: Energy supplier name
      type: object
      title: DevicesGetPVSettingsMetadata
    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
    PVOptimizationSettingsResponse:
      properties:
        pv_curtailment_mode:
          $ref: '#/components/schemas/PVCurtailmentMode'
          description: >-
            PV curtailment mode. If `managed`, NOX Energy manages the PV
            curtailment. If `external`, we follow the curtailment schedule
            provided by the external party. If `off`, PV curtailment is
            disabled. Devices without stored settings default to `off`.
      type: object
      required:
        - pv_curtailment_mode
      title: PVOptimizationSettingsResponse
    PVCurtailmentMode:
      type: string
      enum:
        - managed
        - external
        - 'off'
      title: PVCurtailmentMode
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 'API Key authentication. Enter your API key in the format: YOUR_API_KEY'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.