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

# Create a reporting group

> Creates a new reporting group for the specified organization. Reporting groups are used for organizing and managing device configurations, product settings, and patch policies. You can optionally configure intermediate devices (up to 3) by providing workspace identifiers. Intermediate devices are used for actions like Wake-on-LAN in secure networks, allowing remote powering on of devices through intermediate gateways. Intermediate devices must be defined sequentially: you cannot define intermediate_device_2_id without intermediate_device_1_id, nor intermediate_device_3_id without intermediate_device_2_id. All intermediate device Workspace IDs must exist and belong to the organization. Returns the ID of the successfully created reporting group.



## OpenAPI

````yaml /en/api-reference/openapi.en-v1.json post /v1/organizations/{organization_id}/reporting-groups
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:
    post:
      tags:
        - Reporting Groups
      summary: Create a reporting group
      description: >-
        Creates a new reporting group for the specified organization. Reporting
        groups are used for organizing and managing device configurations,
        product settings, and patch policies. You can optionally configure
        intermediate devices (up to 3) by providing workspace identifiers.
        Intermediate devices are used for actions like Wake-on-LAN in secure
        networks, allowing remote powering on of devices through intermediate
        gateways. Intermediate devices must be defined sequentially: you cannot
        define intermediate_device_2_id without intermediate_device_1_id, nor
        intermediate_device_3_id without intermediate_device_2_id. All
        intermediate device Workspace IDs must exist and belong to the
        organization. Returns the ID of the successfully created reporting
        group.
      operationId: createReportingGroup
      parameters:
        - name: organization id
          in: path
          required: true
          schema:
            type: string
            maxLength: 24
            pattern: ^[0-9a-f]{24}$
          description: The unique identifier of the organization
          example: 507f1f77bcf86cd799439011
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateReportingGroupRequestV1'
            examples:
              create-reporting-group-with-minimal-fields:
                summary: Create a reporting group with only required fields
                value:
                  name: Production Reporting Group
                  product_config_id: 507f1f77bcf86cd799439030
              create-reporting-group-with-all-fields:
                summary: >-
                  Create a reporting group with all available fields, including
                  intermediate devices
                value:
                  name: Development Reporting Group
                  product_config_id: 507f1f77bcf86cd799439030
                  patch_policy_target_id: 507f1f77bcf86cd799439040
                  fishing_pattern: Windows Workstations
                  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: >-
                  Create a reporting group with only the first intermediate
                  device
                value:
                  name: Single Device Reporting Group
                  product_config_id: 507f1f77bcf86cd799439030
                  intermediate_device_1_id: 507f1f77bcf86cd799439050
      responses:
        '201':
          description: >-
            Reporting group created successfully. The response contains the
            created resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportingGroupByIdV1'
        '400':
          $ref: '#/components/responses/BadRequest'
          description: >-
            Invalid request. Common causes: - Mandatory fields are missing
            (name, product_config_id) - Invalid field values - Invalid ID format
            for fields product_config_id, patch_policy_target_id, or
            intermediate_device_*_id - Invalid fishing_pattern_field value (must
            be one of: full_name, description, ou, current_subnet) -
            Fishing_pattern value too long (exceeds maxLength: 250) -
            Intermediate devices not defined sequentially
            (intermediate_device_2_id requires intermediate_device_1_id,
            intermediate_device_3_id requires intermediate_device_2_id)
        '401':
          $ref: '#/components/responses/Unauthorized'
          description: Unauthorized - authentication required
        '404':
          $ref: '#/components/responses/NotFound'
          description: Organization not found
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
          description: >-
            Unprocessable entity. Common causes: - Product configuration not
            found or does not belong to the organization - Intermediate device
            Workspace IDs do not exist or do not belong to the organization
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    CreateReportingGroupRequestV1:
      type: object
      properties:
        name:
          type: string
          maxLength: 512
          description: The reporting group name. Must be unique within the organization.
          example: Production Reporting Group
        product_config_id:
          type: string
          maxLength: 24
          pattern: ^[0-9a-f]{24}$
          description: >-
            Unique identifier of the product configuration to associate with
            this reporting group. Product configuration must exist and belong to
            the organization.
          example: 507f1f77bcf86cd799439030
        patch_policy_target_id:
          type: string
          maxLength: 24
          pattern: ^[0-9a-f]{24}$
          description: >-
            Optional. Unique identifier of the patch policy target to associate
            with this reporting group.
          example: 507f1f77bcf86cd799439040
        fishing_pattern:
          type: string
          maxLength: 250
          description: >-
            Optional. A regular expression pattern used to match devices. Must
            be a valid regex pattern. If provided, fishing_pattern_field must
            also be specified.
          example: Windows Workstations
        fishing_pattern_field:
          type: string
          enum:
            - full_name
            - description
            - ou
            - current_subnet
          description: >-
            Optional. Field to which fishing_pattern is applied. Required if
            fishing_pattern is provided. Valid values: full_name (full device
            name), description (device description), ou (organizational unit),
            current_subnet (current subnet).
          example: full_name
        intermediate_device_1_id:
          type: string
          maxLength: 24
          pattern: ^[0-9a-f]{24}$
          description: >-
            Optional. The unique identifier of the first intermediate device
            Workspace. Intermediate devices are used for actions like
            Wake-on-LAN in secure networks, allowing remote powering on of
            target devices through intermediate gateways. Intermediate devices
            must be sequentially defined without gaps. If
            intermediate_device_2_id or intermediate_device_3_id is provided,
            this field is required.
          example: 507f1f77bcf86cd799439050
        intermediate_device_2_id:
          type: string
          maxLength: 24
          pattern: ^[0-9a-f]{24}$
          description: >-
            Optional. The unique identifier of the second intermediate device
            Workspace. Used for Wake-on-LAN actions in secure networks. Requires
            intermediate_device_1_id to be provided. If intermediate_device_3_id
            is provided, this field is required.
          example: 507f1f77bcf86cd799439051
        intermediate_device_3_id:
          type: string
          maxLength: 24
          pattern: ^[0-9a-f]{24}$
          description: >-
            Optional. The unique identifier of the third intermediate device
            Workspace. Used for Wake-on-LAN actions in secure networks. Requires
            both intermediate_device_1_id and intermediate_device_2_id to be
            provided.
          example: 507f1f77bcf86cd799439052
      required:
        - name
        - product_config_id
      description: >-
        Request body for creating a new reporting group. Reporting groups manage
        devices and handle configurations, patch policies, and routing of
        intermediary devices.
    ReportingGroupByIdV1:
      type: object
      properties:
        id:
          type: string
          description: Reporting group Id
        name:
          type: string
          description: Name of the reporting group
        organization_id:
          type: string
          nullable: true
          description: Organization identifier
        product_config_id:
          type: string
          nullable: true
          description: Product configuration identifier
        fishing_pattern:
          type: string
          nullable: true
          description: Fishing pattern name
        fishing_pattern_field:
          type: string
          enum:
            - full_name
            - description
            - ou
            - current_subnet
          nullable: true
          description: >-
            Field to which fishing_pattern is applied. Possible values:
            full_name, description, ou, current_subnet.
        patch_policy_target_id:
          type: string
          nullable: true
          description: Patch policy target identifier
        policy_reporting_group:
          type: string
          nullable: true
          description: Policy reporting group identifier
        overridden_agent_settings:
          $ref: '#/components/schemas/ReportingGroupAgentSettingsV1'
          nullable: true
          description: Agent settings overridden at the reporting group level
        effective_agent_settings:
          $ref: '#/components/schemas/ReportingGroupEffectiveAgentSettingsV1'
          nullable: true
          description: >-
            Effective agent settings (combined from product configuration and
            overrides)
        execute_flexx_analyzer_agent:
          type: boolean
          description: If Flexx Analyzer agent execution is enabled
        intermediate_device_1_id:
          type: string
          nullable: true
          description: Workspace ID of the first intermediary device (searched by sysId)
        intermediate_device_2_id:
          type: string
          nullable: true
          description: Workspace ID of the second intermediary device (searched by sysId)
        intermediate_device_3_id:
          type: string
          nullable: true
          description: Workspace ID of the third intermediary device (searched by sysId)
      required:
        - id
        - name
        - execute_flexx_analyzer_agent
    ReportingGroupAgentSettingsV1:
      type: object
      properties:
        remote_support:
          type: string
          nullable: true
          description: Remote support configuration
        collect_device_location:
          type: boolean
          nullable: true
          description: If device location collection is enabled
        auto_update_agents:
          type: boolean
          nullable: true
          description: If automatic agent updates are enabled
        collect_event_logs:
          type: boolean
          nullable: true
          description: If event log collection is enabled
        event_log_ids:
          type: string
          nullable: true
          description: Event log record IDs
        event_logs_recurrence:
          type: number
          nullable: true
          description: Event logs recurrence
        collect_disks:
          type: boolean
          nullable: true
          description: If disk collection is enabled
        collect_services:
          type: boolean
          nullable: true
          description: If service collection is enabled
        collect_pnp_events:
          type: boolean
          nullable: true
          description: If PnP event collection is enabled
        collect_public_ip:
          type: boolean
          nullable: true
          description: If public IP collection is enabled
        fra_system_actions_role:
          type: string
          nullable: true
          description: FRA system actions role
        unified_reporting:
          type: string
          nullable: true
          description: Unified reporting configuration
        unified_operations:
          type: string
          nullable: true
          description: Unified operations configuration
        uninstall_protection:
          type: string
          nullable: true
          enum:
            - 'off'
            - 'on'
          description: 'Possible values: off, on. Returns null if no applicable status.'
        web_apps:
          type: boolean
          nullable: true
          description: If web apps are enabled
    ReportingGroupEffectiveAgentSettingsV1:
      type: object
      description: >-
        Effective agent settings (includes product configuration fields plus
        overrides)
      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: 'Possible values: off, on. Returns null if no applicable status.'
        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: 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'
    UnprocessableEntity:
      description: Unprocessable Entity
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: Too Many Requests
      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

````