# List readings of a meter

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /meters/{meterIdentification}/readings:
    get:
      summary: List readings of a meter
      deprecated: false
      description: >-
        This action allows to list readings of a single meter. Only valid and
        fully processed readings are included. Values are in the default unit of
        the corresponding energy. The values can be
        [sorted](https://apidocs.enectiva.cz/introduction-1363538m0.md#sort-options),
        the default order is chronological.


        The number of returned records is by default limited to 1000, see [Limit
        &
        pagination](https://apidocs.enectiva.cz/introduction-1363538m0.md#limit--pagination)
        for details. If more records satisfy your [temporal
        filter](https://apidocs.enectiva.cz/introduction-1363538m0.md#filters),
        you can either keep the filter and paginate over the result set using
        the `page` parameter, or narrow down the filter with each request.


        If you do not specify a `unit`, the readings will be returned in the
        unit configured in Enectiva. You can request readings in an alternative
        unit. The available units depend on the energy measured and match the
        units in the application. Supplying an invalid unit returns an error and
        lists the applicable units.


        The required scope is `readings`.


        By default only active meters are accessible. To query only for readings
        of a deactivated meter include param `deactivated=true`.
      operationId: List readings of a meter
      tags:
        - Readings from Enectiva
        - Readings from Enectiva
      parameters:
        - name: meterIdentification
          in: path
          description: >-
            See [meter
            identification](https://apidocs.enectiva.cz/introduction-1363538m0.md#meter-identification)
          required: true
          example: '{{meterIdentification}}'
          schema:
            type: string
        - name: filter
          in: query
          description: The filter conditions
          required: false
          schema:
            type: string
        - name: unit
          in: query
          description: The unit of the readings
          required: false
          schema:
            type: string
        - name: sort
          in: query
          description: >-
            The sort options. Only `readings.time` is supported at the moment.
            See [sort
            options](https://apidocs.enectiva.cz/introduction-1363538m0.md#sort-options)
            for details.
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: The number of records to return, default is 1000
          required: false
          schema:
            type: number
            default: 1000
        - name: page
          in: query
          description: The page number, default is 1
          required: false
          schema:
            type: number
            default: 1
        - name: deactivated
          in: query
          description: Switches scope to deactivated meters
          required: false
          schema:
            type: boolean
        - name: Accept
          in: header
          description: e.g. application/vnd.api+json
          required: true
          example: application/vnd.api+json
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        attributes:
                          type: object
                          properties:
                            time:
                              type: string
                            state:
                              type: integer
                            unit:
                              type: string
                          required:
                            - time
                            - state
                            - unit
                          x-apidog-orders:
                            - time
                            - state
                            - unit
                        type:
                          type: string
                      required:
                        - id
                        - attributes
                        - type
                      x-apidog-orders:
                        - id
                        - attributes
                        - type
                required:
                  - data
                x-apidog-orders:
                  - data
              examples:
                '1':
                  summary: With data
                  value:
                    data:
                      - id: '5666368'
                        attributes:
                          time: '2018-01-01T00:00:00.000Z'
                          state: 0
                          unit: kWh
                        type: readings
                      - id: '5666365'
                        attributes:
                          time: '2018-12-31T23:59:00.000Z'
                          state: 1200
                          unit: kWh
                        type: readings
                      - id: '5657622'
                        attributes:
                          time: '2019-09-30T12:46:00.000Z'
                          state: 10000
                          unit: kWh
                        type: readings
                '2':
                  summary: Empty
                  value:
                    data: []
                '3':
                  summary: Unsupported sort option
                  value:
                    errors:
                      - status: '400'
                        title: Bad Request
                        detail: >-
                          Sort option `readings.unsupported_field` is not
                          supported
                '4':
                  summary: Invalid filter condition
                  value:
                    errors:
                      - status: '400'
                        title: Bad Request
                        detail: >-
                          Filter condition `readings.time>not_a_date_time` is
                          invalid
                '5':
                  summary: response
                  value:
                    errors:
                      - detail: The provided token has expired
                        status: '401'
                        title: Unauthorized
                '6':
                  summary: response
                  value:
                    errors:
                      - detail: The access token does not have `readings` scope
                        status: '403'
                        title: Forbidden
                '7':
                  summary: response
                  value:
                    errors:
                      - status: '404'
                        title: Not Found
                '8':
                  summary: response
                  value:
                    errors:
                      - detail: >-
                          Unsupported Accept header value in the request. The
                          endpoint expects the request to include header
                          `Accept: application/vnd.api+json`
                        status: '406'
                        title: Not Acceptable
                '9':
                  summary: response
                  value:
                    errors:
                      - detail: >-
                          Multiple meters found with external_id 'METER_001'.
                          Use Enectiva ID instead.
                        meta:
                          conflicting_resources:
                            - href: https://api.enectiva.cz/meters/123/readings
                            - href: https://api.enectiva.cz/meters/456/readings
                        status: '409'
                        title: Conflict
                '10':
                  summary: response
                  value:
                    errors:
                      - status: '429'
                        title: Too Many Requests
                '11':
                  summary: response
                  value:
                    errors:
                      - detail: Something went wrong
                        status: '500'
                        title: Internal Server Error
          headers: {}
          x-apidog-name: OK
        '400':
          description: Bad Request
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        detail:
                          type: string
                        status:
                          type: string
                        title:
                          type: string
                      type: object
                      x-apidog-orders:
                        - detail
                        - status
                        - title
                      required:
                        - detail
                        - status
                        - title
                    type: array
                type: object
                x-apidog-orders:
                  - errors
                examples:
                  - errors:
                      - detail: >-
                          Sort option `readings.unsupported_field` is not
                          supported
                        status: '400'
                        title: Bad Request
                required:
                  - errors
          headers: {}
          x-apidog-name: Bad Request
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        detail:
                          type: string
                        status:
                          type: string
                        title:
                          type: string
                      type: object
                      x-apidog-orders:
                        - detail
                        - status
                        - title
                      required:
                        - detail
                        - status
                        - title
                    type: array
                type: object
                x-apidog-orders:
                  - errors
                examples:
                  - errors:
                      - detail: The provided token has expired
                        status: '401'
                        title: Unauthorized
                required:
                  - errors
          headers: {}
          x-apidog-name: Unauthorized
        '403':
          description: Forbidden
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        detail:
                          type: string
                        status:
                          type: string
                        title:
                          type: string
                      type: object
                      x-apidog-orders:
                        - detail
                        - status
                        - title
                      required:
                        - detail
                        - status
                        - title
                    type: array
                type: object
                x-apidog-orders:
                  - errors
                examples:
                  - errors:
                      - detail: The access token does not have `readings` scope
                        status: '403'
                        title: Forbidden
                required:
                  - errors
          headers: {}
          x-apidog-name: Forbidden
        '404':
          description: Not Found
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        status:
                          type: string
                        title:
                          type: string
                      type: object
                      x-apidog-orders:
                        - status
                        - title
                      required:
                        - status
                        - title
                    type: array
                type: object
                x-apidog-orders:
                  - errors
                examples:
                  - errors:
                      - status: '404'
                        title: Not Found
                required:
                  - errors
          headers: {}
          x-apidog-name: Record Not Found
        '406':
          description: Not Acceptable
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        detail:
                          type: string
                        status:
                          type: string
                        title:
                          type: string
                      type: object
                      x-apidog-orders:
                        - detail
                        - status
                        - title
                      required:
                        - detail
                        - status
                        - title
                    type: array
                type: object
                x-apidog-orders:
                  - errors
                examples:
                  - errors:
                      - detail: >-
                          Unsupported Accept header value in the request. The
                          endpoint expects the request to include header
                          `Accept: application/vnd.api+json`
                        status: '406'
                        title: Not Acceptable
                required:
                  - errors
          headers: {}
          x-apidog-name: Not Acceptable
        '409':
          description: Conflict
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        detail:
                          type: string
                        meta:
                          properties:
                            conflicting_resources:
                              items:
                                properties:
                                  href:
                                    type: string
                                required:
                                  - href
                                type: object
                                x-apidog-orders:
                                  - href
                              type: array
                          type: object
                          x-apidog-orders:
                            - conflicting_resources
                        status:
                          type: string
                        title:
                          type: string
                      type: object
                      x-apidog-orders:
                        - detail
                        - meta
                        - status
                        - title
                      required:
                        - detail
                        - meta
                        - status
                        - title
                    type: array
                type: object
                x-apidog-orders:
                  - errors
                examples:
                  - errors:
                      - detail: >-
                          Multiple meters found with external_id 'METER_001'.
                          Use Enectiva ID instead.
                        meta:
                          conflicting_resources:
                            - href: https://api.enectiva.cz/meters/123/readings
                            - href: https://api.enectiva.cz/meters/456/readings
                        status: '409'
                        title: Conflict
                required:
                  - errors
          headers: {}
          x-apidog-name: Conflict
        '429':
          description: Too Many Requests
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        status:
                          type: string
                        title:
                          type: string
                      type: object
                      x-apidog-orders:
                        - status
                        - title
                      required:
                        - status
                        - title
                    type: array
                type: object
                x-apidog-orders:
                  - errors
                examples:
                  - errors:
                      - status: '429'
                        title: Too Many Requests
                required:
                  - errors
          headers: {}
          x-apidog-name: Too Many Requests
        '500':
          description: Internal Server Error
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        detail:
                          type: string
                        status:
                          type: string
                        title:
                          type: string
                      type: object
                      x-apidog-orders:
                        - detail
                        - status
                        - title
                      required:
                        - detail
                        - status
                        - title
                    type: array
                type: object
                x-apidog-orders:
                  - errors
                examples:
                  - errors:
                      - detail: Something went wrong
                        status: '500'
                        title: Internal Server Error
                required:
                  - errors
          headers: {}
          x-apidog-name: Server Error
      security:
        - Access token: []
          x-apidog:
            schemeGroups:
              - id: 4J8DUrcaST-D2ki_jmtDF
                schemeIds:
                  - Access token
            required: true
            use:
              id: 4J8DUrcaST-D2ki_jmtDF
            scopes:
              4J8DUrcaST-D2ki_jmtDF: {}
      x-apidog-folder: Readings from Enectiva
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1003855/apis/api-19188106-run
components:
  schemas: {}
  securitySchemes:
    Access token:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      x-apidog:
        addTokenTo: header
        headerPrefix: Bearer
    Import token:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      x-apidog:
        addTokenTo: header
        headerPrefix: Bearer
    Login token:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      x-apidog:
        addTokenTo: header
        headerPrefix: Bearer
    Access  or  Import token:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      x-apidog:
        addTokenTo: header
        headerPrefix: Bearer
servers:
  - url: https://api.enectiva.cz
    description: https://api.enectiva.cz
security: []

```
