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

# Actualizar configuración de versiones de agente

> Actualiza por reemplazo completo la configuración de versiones de agente para el grupo de reporte solicitado. Este endpoint solo está disponible cuando el grupo de reporte tiene asignada una configuración de producto con autogestión de versiones habilitada; en caso contrario devuelve 409. La habilitación de esta capacidad es una configuración de plataforma gestionada fuera del cliente API. El listado de reporting groups informa esta capacidad mediante el campo "can_manage_agent_versions". Para actualización con API key se requiere el rol "Administrador de organización".



## OpenAPI

````yaml /api-reference/openapi-v1.json put /v1/organizations/{organization_id}/reporting-groups/{reporting_group_id}/agent-versions
openapi: 3.0.3
info:
  title: API Publica Portal
  version: 1.0.0
  description: Api publica REST para portal
servers:
  - url: https://api.staging.flxwvdexternal.com
    description: Staging API server
security:
  - bearerAuth: []
tags: []
paths:
  /v1/organizations/{organization_id}/reporting-groups/{reporting_group_id}/agent-versions:
    put:
      tags:
        - Grupos de reporte
      summary: Actualizar configuración de versiones de agente
      description: >-
        Actualiza por reemplazo completo la configuración de versiones de agente
        para el grupo de reporte solicitado. Este endpoint solo está disponible
        cuando el grupo de reporte tiene asignada una configuración de producto
        con autogestión de versiones habilitada; en caso contrario devuelve 409.
        La habilitación de esta capacidad es una configuración de plataforma
        gestionada fuera del cliente API. El listado de reporting groups informa
        esta capacidad mediante el campo "can_manage_agent_versions". Para
        actualización con API key se requiere el rol "Administrador de
        organización".
      operationId: update_reporting_group_agent_versions
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            minLength: 24
            maxLength: 24
          description: Identificador de la organización objetivo.
          example: 507f1f77bcf86cd799439011
        - name: reporting_group_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            minLength: 24
            maxLength: 24
          description: Identificador del grupo de reporte objetivo.
          example: 507f1f77bcf86cd799439022
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateReportingGroupAgentVersionsRequestV1'
            examples:
              full_replacement:
                summary: Actualización completa
                value:
                  agent_auto_update: false
                  versions:
                    windows_cp:
                      early: latest
                      production: latest
                    windows:
                      early: 2.31.0
                      production: 2.30.4
                    macos:
                      early: latest
                      production: 1.10.0
                    linux:
                      early: latest
                      production: 1.12.0
      responses:
        '200':
          description: Versiones de agente actualizadas correctamente.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetReportingGroupAgentVersionsResponseV1'
              examples:
                ok_response:
                  summary: Versiones actualizadas del grupo
                  value:
                    agent_auto_update: false
                    versions:
                      windows_cp:
                        early: latest
                        production: latest
                      windows:
                        early: 2.31.0
                        production: 2.30.4
                      macos:
                        early: latest
                        production: 1.10.0
                      linux:
                        early: latest
                        production: 1.12.0
        '400':
          $ref: '#/components/responses/BadRequest'
          description: Parámetros de ruta o cuerpo inválidos.
        '401':
          $ref: '#/components/responses/Unauthorized'
          description: No autorizado.
        '404':
          $ref: '#/components/responses/NotFound'
          description: Grupo de reporte no encontrado.
        '409':
          $ref: '#/components/responses/Conflict'
          description: El grupo no permite autogestión de versiones de agente.
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    UpdateReportingGroupAgentVersionsRequestV1:
      type: object
      properties:
        agent_auto_update:
          type: boolean
        versions:
          $ref: '#/components/schemas/ReportingGroupAgentVersionsV1'
      required:
        - agent_auto_update
        - versions
    GetReportingGroupAgentVersionsResponseV1:
      type: object
      properties:
        agent_auto_update:
          type: boolean
        versions:
          $ref: '#/components/schemas/ReportingGroupAgentVersionsV1'
      required:
        - agent_auto_update
        - versions
    ReportingGroupAgentVersionsV1:
      type: object
      properties:
        windows_cp:
          $ref: '#/components/schemas/ReportingGroupAgentVersionChannelPairV1'
        windows:
          $ref: '#/components/schemas/ReportingGroupAgentVersionChannelPairV1'
        macos:
          $ref: '#/components/schemas/ReportingGroupAgentVersionChannelPairV1'
        linux:
          $ref: '#/components/schemas/ReportingGroupAgentVersionChannelPairV1'
      required:
        - windows_cp
        - windows
        - macos
        - linux
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
            details:
              type: string
          required:
            - message
            - code
      required:
        - error
    ReportingGroupAgentVersionChannelPairV1:
      type: object
      properties:
        early:
          type: string
        production:
          type: string
      required:
        - early
        - production
  responses:
    BadRequest:
      description: Solicitud incorrecta
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: No autorizado
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: No encontrado
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: Conflicto
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Error interno del servidor
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````