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

# Listar treinamentos

> Lista os treinamentos do agente



## OpenAPI

````yaml GET /v2/agent/{agentId}/trainings
openapi: 3.0.1
info:
  title: OpenAPI GPT Maker
  description: Documentação completa da API do GPT Maker
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.gptmaker.ai
security:
  - bearerAuth: []
paths:
  /v2/agent/{agentId}/trainings:
    get:
      description: Lista os treinamentos do agente
      parameters:
        - name: agentId
          in: path
          description: ID do agente
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: Número da página
          schema:
            type: integer
            format: int32
        - name: pageSize
          in: query
          description: Tamanho da página
          schema:
            type: integer
            format: int32
        - name: type
          in: query
          description: Tipo do treinamento a ser filtrado
          required: true
          schema:
            type: string
            enum:
              - TEXT
              - WEBSITE
              - VIDEO
              - DOCUMENT
        - name: query
          in: query
          description: Filtro para os treinamentos
          schema:
            type: string
      responses:
        '200':
          description: Lista de treinamentos
          content:
            application/json:
              schema:
                oneOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/TextTraining'
                  - type: array
                    items:
                      $ref: '#/components/schemas/WebsiteTraining'
                  - type: array
                    items:
                      $ref: '#/components/schemas/VideoTraining'
                  - type: array
                    items:
                      $ref: '#/components/schemas/DocumentTraining'
        '400':
          description: Erro inesperado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Erro de token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
components:
  schemas:
    TextTraining:
      type: object
      properties:
        id:
          type: string
          description: ID do treinamento
        type:
          type: string
          description: Tipo do treinamento
          enum:
            - TEXT
        text:
          type: string
          description: Texto do treinamento
        image:
          type: string
          description: Imagem do treinamento
    WebsiteTraining:
      type: object
      properties:
        id:
          type: string
          description: ID do treinamento
        type:
          type: string
          description: Tipo do treinamento
          enum:
            - WEBSITE
        website:
          type: string
          description: Website do treinamento
        trainingSubPages:
          type: string
          description: Treinamento em subpáginas
          enum:
            - DISABLED
            - ACTIVE
        trainingInterval:
          type: string
          description: Intervalo de treinamento
          enum:
            - THIRTY_SECONDS
            - NEVER
            - ONE_HOUR
            - FOUR_HOUR
            - EIGHT_HOUR
            - TWELVE_HOUR
            - ONE_DAY
            - ONE_WEEK
            - ONE_MONTH
    VideoTraining:
      type: object
      properties:
        id:
          type: string
          description: ID do treinamento
        type:
          type: string
          description: Tipo do treinamento
          enum:
            - VIDEO
        video:
          type: string
          description: Vídeo do treinamento
    DocumentTraining:
      type: object
      properties:
        id:
          type: string
          description: ID do treinamento
        type:
          type: string
          description: Tipo do treinamento
          enum:
            - DOCUMENT
        documentUrl:
          type: string
          description: URL do documento do treinamento
        documentName:
          type: string
          description: Nome do documento do treinamento
        documentMimetype:
          type: string
          description: Tipo MIME do documento do treinamento
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
    Error403:
      required:
        - error
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````