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

# Busca eventos

> faz uma busca por eventos



## OpenAPI

````yaml GET /broker/alert-events
openapi: 3.0.1
info:
  title: OpenAPI Auth Store
  description: API de exemplo para demonstração de autenticação e obtenção de tokens.
  license:
    name: Allcom Telecom
  version: 1.0.0
servers:
  - url: >-
      https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1
security: []
paths:
  /broker/alert-events:
    servers:
      - url: >-
          https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1
        description: faz uma busca por eventos
    get:
      description: faz uma busca por eventos
      parameters:
        - name: Content-Type
          in: header
          required: true
          description: |-
            Define o formato da requisição.

            🔹 **Valor padrão:**
            ```
            application/json
            ```
            📌 **Dica:** Copie e cole esse valor no campo Content-Type.
          schema:
            type: string
            example: application/json
            default: application/json
        - name: client_id
          in: header
          required: true
          schema:
            type: string
            description: Identificador do client id do sensedia
            example: '123'
        - name: access_token
          in: header
          required: true
          schema:
            type: string
            description: Token gerado
            example: Basic MzQ4OSozNDMyLTMOMzItMTIz
        - name: showContracted
          in: query
          required: false
          schema:
            type: boolean
            description: Visão a ser contemplada
            enum:
              - true visão a pagar
              - false visão a receber
        - name: page
          in: query
          required: false
          schema:
            type: integer
            description: Página
            example: '1'
        - name: pageSize
          in: query
          required: false
          schema:
            type: integer
            description: Tamanho da página
            example: '30'
            default: '30'
        - name: msisdn
          in: query
          required: false
          schema:
            type: string
            description: Numero do MSISDN do dispositivo
            example: '5534991026676'
        - name: contractId
          in: query
          required: false
          schema:
            type: number
            description: ID do contrato
            example: '65454546'
        - name: dateFrom
          in: query
          required: false
          schema:
            type: string
            description: Disparado em(inicio) - se preenchido a dateTo é obrigatória
            example: '2025-02-05T10:51:08.073Z'
        - name: dateTo
          in: query
          required: false
          schema:
            type: string
            description: Disparado em(final) - se preenchido a dateFrom é obrigatória
            example: '2025-02-05T10:51:08.073Z'
        - name: eventType
          in: query
          required: false
          schema:
            type: string
            description: Tipo de evento
            enum:
              - CONSUMPTION(Consumo de simcards)
              - CONTRACT_CONSUMPTION(Consumo de contrato)
        - name: field
          in: query
          required: false
          schema:
            type: string
            description: Tipo
            enum:
              - consumptionCurrentDay(Consumo do dia)
              - consumptionTotal(Consumo total)
              - consumptionPercent(Consumo percentual)
              - consumptionCurrentDayAnomaly(Anomalia de consumo do dia)
              - consumptionTotalAnomaly(Anomalia de consumo total)
      responses:
        '200':
          description: Request report created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  OK:
                    type: string
                    example:
                      id: 29255
                      alertId: 168
                      customerId: 58987
                      terminalId: 654556
                      contractId: 45447
                      msisdn: '5516998784563'
                      eventType: CONTRACT_CONSUMPTION
                      field: consumptionPercent
                      operator: '>'
                      thresholdValue: 150
                      eventValue: 166.66666666666666
                      name: teste
                      createdAt: '2025-01-30T16:10:04'
              example:
                id: 29255
                alertId: 168
                customerId: 58987
                terminalId: 654556
                contractId: 45447
                msisdn: '5516998784563'
                eventType: CONTRACT_CONSUMPTION
                field: consumptionPercent
                operator: '>'
                thresholdValue: 150
                eventValue: 166.66666666666666
                name: teste
                createdAt: '2025-01-30T16:10:04'
        '400':
          description: Requisição mal formada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example:
                      errors: Parameter not found
              example:
                error: Requisição mal formada.
        '401':
          description: Requisição requer autenticação.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Requisição requer autenticação.
        '403':
          description: O acesso ao recurso foi negado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: O acesso ao recurso foi negado.
        '404':
          description: URI de API/Recurso inexiste para processamento.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: URI de API/Recurso inexiste para processamento.
        '500':
          description: Erro Interno do servidor.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example:
                      errors: Parameter not found
              example:
                errors: Parameter not found

````