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

# Obtenir configuració de versions d'agent

> Retorna la configuració efectiva de versions d'agent per al grup de reporte sol·licitat. Aquest endpoint només està disponible quan el grup de reporte té assignada una configuració de producte amb autogestió de versions habilitada; en cas contrari retorna 409. L'habilitació d'aquesta capacitat és una configuració de plataforma gestionada fora del client API. El llistat de reporting groups informa d'aquesta capacitat mitjançant el camp "can_manage_agent_versions". Per a lectura amb API key es requereix el permís "Equip de L3 d'enginyeria" o el rol "Administrador d'organització".



## OpenAPI

````yaml /ca/api-reference/openapi.ca-v1.json get /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 pública REST per al portal
servers:
  - url: https://api.flexxible.net
    description: Portal API (production)
security:
  - bearerAuth: []
tags: []
paths:
  /v1/organizations/{organization_id}/reporting-groups/{reporting_group_id}/agent-versions:
    get:
      tags:
        - Grups de report
      summary: Obtenir configuració de versions d'agent
      description: >-
        Retorna la configuració efectiva de versions d'agent per al grup de
        reporte sol·licitat. Aquest endpoint només està disponible quan el grup
        de reporte té assignada una configuració de producte amb autogestió de
        versions habilitada; en cas contrari retorna 409. L'habilitació
        d'aquesta capacitat és una configuració de plataforma gestionada fora
        del client API. El llistat de reporting groups informa d'aquesta
        capacitat mitjançant el camp "can_manage_agent_versions". Per a lectura
        amb API key es requereix el permís "Equip de L3 d'enginyeria" o el rol
        "Administrador d'organització".
      operationId: get_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 l'organització objectiu.
          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 grup de reporte objectiu.
          example: 507f1f77bcf86cd799439022
      responses:
        '200':
          description: Versions d'agent recuperades correctament.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetReportingGroupAgentVersionsResponseV1'
              examples:
                ok_response:
                  summary: Versions efectives del grup
                  value:
                    agent_auto_update: true
                    versions:
                      windows_cp:
                        early: latest
                        production: latest
                      windows:
                        early: 2.20.0
                        production: 2.19.3
                      macos:
                        early: latest
                        production: 1.9.2
                      linux:
                        early: latest
                        production: 1.11.0
        '400':
          $ref: '#/components/responses/BadRequest'
          description: Paràmetres de camí invàlids.
        '401':
          $ref: '#/components/responses/Unauthorized'
          description: No autoritzat.
        '404':
          $ref: '#/components/responses/NotFound'
          description: Grup de reporte no trobat.
        '409':
          $ref: '#/components/responses/Conflict'
          description: El grup no permet autogestió de versions d'agent.
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    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: Sol·licitud incorrecta
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: No autoritzat
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: No trobat
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: Conflicte
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Error intern del servidor
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````