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

# Crear un grup de informe

> Crea un nou grup de reporte per a l'organització especificada. Els grups de reporte s'utilitzen per organitzar i gestionar configuracions de dispositius, ajustaments de producte i polítiques de pedaços. Pots configurar opcionalment dispositius intermedis (fins a 3) proporcionant identificadors de workspace. Els dispositius intermedis s'utilitzen per a accions Wake on LAN en xarxes segures, permetent l'encesa remot de dispositius a través de passarel·les intermediàries. Els dispositius intermedis han de definir-se seqüencialment: no pots definir intermediate_device_2_id sense intermediate_device_1_id, ni intermediate_device_3_id sense intermediate_device_2_id. Tots els IDs de Workspace de dispositius intermedis han d'existir i pertànyer a l'organització. Retorna el ID del grup de reporte creat després d'una creació satisfactòria.



## OpenAPI

````yaml /ca/api-reference/openapi.ca-v1.json post /v1/organizations/{organization_id}/reporting-groups
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:
    post:
      tags:
        - Grups de report
      summary: Crear un grup de informe
      description: >-
        Crea un nou grup de reporte per a l'organització especificada. Els grups
        de reporte s'utilitzen per organitzar i gestionar configuracions de
        dispositius, ajustaments de producte i polítiques de pedaços. Pots
        configurar opcionalment dispositius intermedis (fins a 3) proporcionant
        identificadors de workspace. Els dispositius intermedis s'utilitzen per
        a accions Wake on LAN en xarxes segures, permetent l'encesa remot de
        dispositius a través de passarel·les intermediàries. Els dispositius
        intermedis han de definir-se seqüencialment: no pots definir
        intermediate_device_2_id sense intermediate_device_1_id, ni
        intermediate_device_3_id sense intermediate_device_2_id. Tots els IDs de
        Workspace de dispositius intermedis han d'existir i pertànyer a
        l'organització. Retorna el ID del grup de reporte creat després d'una
        creació satisfactòria.
      operationId: createReportingGroup
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            maxLength: 24
            pattern: ^[0-9a-f]{24}$
          description: El identificador únic de l'organització
          example: 507f1f77bcf86cd799439011
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateReportingGroupRequestV1'
            examples:
              create-reporting-group-with-minimal-fields:
                summary: Crear un grup de report només amb els camps obligatoris
                value:
                  name: Grupo de reporte de Producción
                  product_config_id: 507f1f77bcf86cd799439030
              create-reporting-group-with-all-fields:
                summary: >-
                  Crear un grup de report amb tots els camps disponibles,
                  inclosos dispositius intermedis
                value:
                  name: Grupo de reporte de Desarrollo
                  product_config_id: 507f1f77bcf86cd799439030
                  patch_policy_target_id: 507f1f77bcf86cd799439040
                  fishing_pattern: Estaciones de trabajo Windows
                  fishing_pattern_field: full_name
                  intermediate_device_1_id: 507f1f77bcf86cd799439050
                  intermediate_device_2_id: 507f1f77bcf86cd799439051
                  intermediate_device_3_id: 507f1f77bcf86cd799439052
              create-reporting-group-with-single-intermediate-device:
                summary: >-
                  Crear un grup de report només amb el primer dispositiu
                  intermedi
                value:
                  name: Grupo de reporte de dispositivo único
                  product_config_id: 507f1f77bcf86cd799439030
                  intermediate_device_1_id: 507f1f77bcf86cd799439050
      responses:
        '201':
          description: >-
            Grup de reporte creat correctament. La resposta conté el recurs
            creat.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportingGroupByIdV1'
        '400':
          $ref: '#/components/responses/BadRequest'
          description: >-
            Sol·licitud incorrecta. Causes comunes: - Falten camps obligatoris
            (name, product_config_id) - Valors de camp invàlids - Format d'ID
            invàlid per a camps product_config_id, patch_policy_target_id o
            intermediate_device_*_id - Valor de fishing_pattern_field invàlid
            (ha de ser un de: full_name, description, ou, current_subnet) -
            Valor de fishing_pattern invàlid (excedeix maxLength: 250) -
            Dispositius intermedis no definits seqüencialment
            (intermediate_device_2_id requereix intermediate_device_1_id,
            intermediate_device_3_id requereix intermediate_device_2_id)
        '401':
          $ref: '#/components/responses/Unauthorized'
          description: No autoritzat - es requereix autenticació
        '404':
          $ref: '#/components/responses/NotFound'
          description: Organització no trobada
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
          description: >-
            Entitat no processable. Causes comunes: - La configuració de
            producte no s'ha trobat o no pertany a l'organització - Els IDs
            d'espais de treball de dispositius intermedis no existeixen o no
            pertanyen a l'organització
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    CreateReportingGroupRequestV1:
      type: object
      properties:
        name:
          type: string
          maxLength: 512
          description: El nom del grup de reporte. Ha de ser únic dins de l'organització.
          example: Grupo de reporte de Producción
        product_config_id:
          type: string
          maxLength: 24
          pattern: ^[0-9a-f]{24}$
          description: >-
            L'identificador únic de la configuració de producte que s'associarà
            amb aquest grup de reporte. La configuració de producte ha d'existir
            i pertànyer a l'organització.
          example: 507f1f77bcf86cd799439030
        patch_policy_target_id:
          type: string
          maxLength: 24
          pattern: ^[0-9a-f]{24}$
          description: >-
            Opcional. L'identificador únic del destí de política de pegats que
            s'associarà amb aquest grup de reporte.
          example: 507f1f77bcf86cd799439040
        fishing_pattern:
          type: string
          maxLength: 250
          description: >-
            Opcional. Un patró d'expressió regular utilitzat per coincidir
            dispositius. Ha de ser un patró regex vàlid. Si es proporciona,
            també s'ha d'especificar fishing_pattern_field.
          example: Estaciones de trabajo Windows
        fishing_pattern_field:
          type: string
          enum:
            - full_name
            - description
            - ou
            - current_subnet
          description: >-
            Opcional. Camp sobre el qual s'aplica fishing_pattern. Obligatori si
            es proporciona fishing_pattern. Valors vàlids: full_name (nom
            complet del dispositiu), description (descripció del dispositiu), ou
            (unitat organitzativa), current_subnet (subxarxa actual).
          example: full_name
        intermediate_device_1_id:
          type: string
          maxLength: 24
          pattern: ^[0-9a-f]{24}$
          description: >-
            Opcional. L'identificador únic del primer Workspace de dispositiu
            intermedi. Els dispositius intermedis s'utilitzen per a accions Wake
            on LAN en xarxes segures, permetent l'encesa remot de dispositius
            objectiu a través de passarel·les intermediàries. Els dispositius
            intermedis han de definir-se seqüencialment sense buits. Si es
            proporcionen intermediate_device_2_id o intermediate_device_3_id,
            aquest camp és obligatori.
          example: 507f1f77bcf86cd799439050
        intermediate_device_2_id:
          type: string
          maxLength: 24
          pattern: ^[0-9a-f]{24}$
          description: >-
            Opcional. L'identificador únic del segon Workspace de dispositiu
            intermedi. S'utilitza per accions Wake on LAN en xarxes segures.
            Requereix que es proporcioni intermediate_device_1_id. Si es
            proporciona intermediate_device_3_id, aquest camp és obligatori.
          example: 507f1f77bcf86cd799439051
        intermediate_device_3_id:
          type: string
          maxLength: 24
          pattern: ^[0-9a-f]{24}$
          description: >-
            Opcional. L'identificador únic del tercer Workspace de dispositiu
            intermedi. S'utilitza per accions Wake on LAN en xarxes segures.
            Requereix que es proporcionin intermediate_device_1_id i
            intermediate_device_2_id.
          example: 507f1f77bcf86cd799439052
      required:
        - name
        - product_config_id
      description: >-
        Cos de sol·licitud per crear un nou grup de reporte. Els grups de
        reporte organitzen dispositius i gestionen configuracions, polítiques de
        pegats i enrutament de dispositius intermedis.
    ReportingGroupByIdV1:
      type: object
      properties:
        id:
          type: string
          description: ID del grup de report
        name:
          type: string
          description: Nom del grup de report
        organization_id:
          type: string
          nullable: true
          description: Identificador de l'organització
        product_config_id:
          type: string
          nullable: true
          description: Identificador de la configuració del producte
        fishing_pattern:
          type: string
          nullable: true
          description: Nom del fishing pattern
        fishing_pattern_field:
          type: string
          enum:
            - full_name
            - description
            - ou
            - current_subnet
          nullable: true
          description: >-
            Camp sobre el qual s'aplica fishing_pattern. Valors possibles:
            full_name, description, ou, current_subnet.
        patch_policy_target_id:
          type: string
          nullable: true
          description: Identificador del destí de política de pegats
        policy_reporting_group:
          type: string
          nullable: true
          description: Identificador del grup de reporte de política
        overridden_agent_settings:
          $ref: '#/components/schemas/ReportingGroupAgentSettingsV1'
          nullable: true
          description: Ajustaments de l'agent sobrescrits a nivell de grup de reporte
        effective_agent_settings:
          $ref: '#/components/schemas/ReportingGroupEffectiveAgentSettingsV1'
          nullable: true
          description: >-
            Ajustaments efectius de l'agent (combinats des de la configuració
            del producte i sobrescritures)
        execute_flexx_analyzer_agent:
          type: boolean
          description: Si l'execució de l'agent Flexx Analyzer està habilitada
        intermediate_device_1_id:
          type: string
          nullable: true
          description: ID de Workspace del primer dispositiu intermedi (buscat per sysId)
        intermediate_device_2_id:
          type: string
          nullable: true
          description: ID de Workspace del segon dispositiu intermedi (buscat per sysId)
        intermediate_device_3_id:
          type: string
          nullable: true
          description: ID de Workspace del tercer dispositiu intermedi (buscat per sysId)
      required:
        - id
        - name
        - execute_flexx_analyzer_agent
    ReportingGroupAgentSettingsV1:
      type: object
      properties:
        remote_support:
          type: string
          nullable: true
          description: Configuració de suport remot
        collect_device_location:
          type: boolean
          nullable: true
          description: Si la recopilació d'ubicació del dispositiu està habilitada
        auto_update_agents:
          type: boolean
          nullable: true
          description: Si l'actualització automàtica d'agents està habilitada
        collect_event_logs:
          type: boolean
          nullable: true
          description: Si la recopilació de registres d'esdeveniments està habilitada
        event_log_ids:
          type: string
          nullable: true
          description: IDs de registres d'esdeveniments
        event_logs_recurrence:
          type: number
          nullable: true
          description: Recurrència de registres d'esdeveniments
        collect_disks:
          type: boolean
          nullable: true
          description: Si la recopilació de discos està habilitada
        collect_services:
          type: boolean
          nullable: true
          description: Si la recopilació de serveis està habilitada
        collect_pnp_events:
          type: boolean
          nullable: true
          description: Si la recopilació d'esdeveniments PnP està habilitada
        collect_public_ip:
          type: boolean
          nullable: true
          description: Si la recopilació d'IP pública està habilitada
        fra_system_actions_role:
          type: string
          nullable: true
          description: Rol d'accions del sistema FRA
        unified_reporting:
          type: string
          nullable: true
          description: Configuració de reporte unificat
        unified_operations:
          type: string
          nullable: true
          description: Configuració d'operacions unificades
        uninstall_protection:
          type: string
          nullable: true
          enum:
            - 'off'
            - 'on'
          description: >-
            Valors possibles: off, on. Si no hi ha cap estat aplicable, retorna
            null.
        web_apps:
          type: boolean
          nullable: true
          description: Si les aplicacions web estan habilitades
    ReportingGroupEffectiveAgentSettingsV1:
      type: object
      description: >-
        Ajustaments efectius de l'agent (inclou camps de configuració del
        producte més sobrescritures)
      properties:
        remote_support:
          type: string
          nullable: true
        collect_device_location:
          type: boolean
          nullable: true
        auto_update_agents:
          type: boolean
          nullable: true
        collect_event_logs:
          type: boolean
          nullable: true
        event_log_ids:
          type: string
          nullable: true
        event_logs_recurrence:
          type: number
          nullable: true
        collect_disks:
          type: boolean
          nullable: true
        collect_services:
          type: boolean
          nullable: true
        collect_pnp_events:
          type: boolean
          nullable: true
        collect_public_ip:
          type: boolean
          nullable: true
        fra_system_actions_role:
          type: string
          nullable: true
        unified_reporting:
          type: string
          nullable: true
        uninstall_protection:
          type: string
          nullable: true
          enum:
            - 'off'
            - 'on'
          description: >-
            Valors possibles: off, on. Si no hi ha cap estat aplicable, retorna
            null.
        resources_report_recurrence:
          type: number
          nullable: true
        profile_storage_report_recurrence:
          type: number
          nullable: true
        sync_broker_recurrence:
          type: number
          nullable: true
        detect_new_citrix_subscriptions:
          type: boolean
          nullable: true
        proxy_type:
          type: string
          nullable: true
        can_enable_flexx_agent_per_group:
          type: boolean
          nullable: true
        web_apps:
          type: boolean
          nullable: true
        fra_simplified_security:
          type: string
          nullable: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
            details:
              type: string
          required:
            - message
            - code
      required:
        - error
  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'
    UnprocessableEntity:
      description: Entitat no processable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: Masses sol·licituds
      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

````