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

# Search OCPP logs

> Lists the OCPP events recorded by the stations of the organization, with filters and pagination.



## OpenAPI

````yaml /openapi.json post /charging-station-logs/search
openapi: 3.1.0
info:
  title: CSMS API
  description: Backend API documentation
  version: 0.0.0
servers: []
security: []
paths:
  /charging-station-logs/search:
    post:
      tags:
        - charging station logs
      summary: Search OCPP logs
      description: >-
        Lists the OCPP events recorded by the stations of the organization, with
        filters and pagination.
      operationId: postChargingStationLogsSearch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                page:
                  type: number
                perPage:
                  type: number
                sort:
                  type: object
                  properties:
                    field:
                      type: string
                    direction:
                      type: string
                      enum:
                        - asc
                        - desc
                  required:
                    - field
                    - direction
                chargingStationId:
                  type: number
                groupId:
                  type: number
                eventType:
                  type: string
                eventTypes:
                  type: array
                  items:
                    type: string
                excludeEventTypes:
                  type: array
                  items:
                    type: string
                createdAtFrom:
                  type: string
                  format: date-time
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                createdAtTo:
                  type: string
                  format: date-time
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        chargingStationId:
                          type: number
                        eventType:
                          type: string
                        payload: {}
                        createdAt:
                          type: string
                          format: date-time
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                        chargingStation:
                          type: object
                          properties:
                            id:
                              type: number
                            identifier:
                              type: string
                            name:
                              anyOf:
                                - type: string
                                - type: 'null'
                            group:
                              anyOf:
                                - type: object
                                  properties:
                                    id:
                                      type: number
                                    name:
                                      type: string
                                    description:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                    organizationId:
                                      type: number
                                    createdAt:
                                      type: string
                                      format: date-time
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                                    updatedAt:
                                      type: string
                                      format: date-time
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                                  required:
                                    - id
                                    - name
                                    - description
                                    - organizationId
                                    - createdAt
                                    - updatedAt
                                - type: 'null'
                          required:
                            - id
                            - identifier
                            - name
                            - group
                      required:
                        - id
                        - chargingStationId
                        - eventType
                        - payload
                        - createdAt
                        - chargingStation
                  meta:
                    type: object
                    properties:
                      page:
                        type: number
                      perPage:
                        type: number
                      totalItems:
                        type: number
                      totalPages:
                        type: number
                      sort:
                        type: object
                        properties:
                          field:
                            type: string
                          direction:
                            type: string
                        required:
                          - field
                          - direction
                      filters: {}
                    required:
                      - page
                      - perPage
                      - totalItems
                      - totalPages
                      - sort
                required:
                  - data
                  - meta
        '404':
          description: Charging station not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    const: 404
                  message:
                    type: string
                    const: Charging station not found
                  type:
                    type: string
                    const: CHARGING_STATION_NOT_FOUND
                  attributes:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type: string
                required:
                  - status
                  - message
                  - type

````