> ## 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.

# Update agent versions configuration

> Updates the configuration of agent versions for the requested report group by full replacement. This endpoint is only available when the report group has an assigned product configuration with enabled self-management of versions; otherwise returns 409. Enablement of this capability is a platform configuration managed outside the API client. The list of reporting groups indicates this capability via the "can_manage_agent_versions" field. Updating with API key requires "Organization Administrator" role.



## OpenAPI

````yaml /en/api-reference/openapi.en-v1.json put /v1/organizations/{organization_id}/reporting-groups/{reporting_group_id}/agent-versions
openapi: 3.0.3
info:
  title: Public Portal API
  version: 1.0.0
  description: Public REST API for 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:
        - Reporting Groups
      summary: Update agent versions configuration
      description: >-
        Updates the configuration of agent versions for the requested report
        group by full replacement. This endpoint is only available when the
        report group has an assigned product configuration with enabled
        self-management of versions; otherwise returns 409. Enablement of this
        capability is a platform configuration managed outside the API client.
        The list of reporting groups indicates this capability via the
        "can_manage_agent_versions" field. Updating with API key requires
        "Organization Administrator" role.
      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: Identifier of the target organization.
          example: 507f1f77bcf86cd799439011
        - name: reporting_group_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            minLength: 24
            maxLength: 24
          description: Identifier of the target report group.
          example: 507f1f77bcf86cd799439022
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateReportingGroupAgentVersionsRequestV1'
            examples:
              full_replacement:
                summary: Full update
                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: Agent versions successfully updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetReportingGroupAgentVersionsResponseV1'
              examples:
                ok_response:
                  summary: Group versions updated
                  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: Invalid route or body parameters.
        '401':
          $ref: '#/components/responses/Unauthorized'
          description: Unauthorized.
        '404':
          $ref: '#/components/responses/NotFound'
          description: Report group not found.
        '409':
          $ref: '#/components/responses/Conflict'
          description: The group does not allow self-management of agent versions.
        '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: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````