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

# List workspaces

> Retrieve a paginated list of Workspaces. Supports pagination, sorting, and filtering using a JSON filter string.



## OpenAPI

````yaml /en/api-reference/openapi.en-v1.json get /v1/organizations/{organization_id}/workspaces
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}/workspaces:
    get:
      tags:
        - Workspaces
      summary: List workspaces
      description: >-
        Retrieve a paginated list of Workspaces. Supports pagination, sorting,
        and filtering using a JSON filter string.
      operationId: listWorkspaces
      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
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
          description: 'Page number (default: 1)'
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            default: 100
            maximum: 100
            minimum: 1
          description: 'Items per page (default: 100, max.: 100)'
        - name: sort
          in: query
          required: false
          schema:
            type: string
            pattern: ^([a-z_]+):(asc|desc)$
          description: >-
            Sorting expression in the format <field>:asc|desc. In aggregate
            mode, only accepts `group_by` fields or aggregated aliases (`count`,
            `<function>_<field>`).
        - name: fields
          in: query
          required: false
          schema:
            type: string
            maxLength: 2048
          description: Comma-separated list of response fields to include.
          example: name,user_name,operating_system
        - name: aggregate
          in: query
          required: false
          schema:
            type: string
            maxLength: 1024
          description: >-
            Group and calculate aggregations over Workspaces. Must be sent as a
            JSON string with `group_by` (array of contract fields) and
            `aggregates` (array of objects `{ field, function }`). `field` can
            be `"*"` only when `function` is `"count"`. Allowed values for
            `function`: `count`, `sum`, `avg`, `min`, `max`. The `aggregate`
            parameter cannot be combined with `fields`. In aggregate mode,
            `sort` can only sort by `group_by` fields or aggregated outputs
            (`count`, `function_field`).
          examples:
            simple:
              summary: Group by status and count
              value: >-
                {"group_by":["status"],"aggregates":[{"field":"*","function":"count"}]}
            with-average:
              summary: Group by platform and calculate average
              value: >-
                {"group_by":["platform_type"],"aggregates":[{"field":"*","function":"count"},{"field":"percent_cpu","function":"avg"}]}
        - name: filters
          in: query
          required: false
          schema:
            type: string
            maxLength: 5120
          description: >-
            Filter Workspaces by one or more criteria. Provide a JSON object
            with filter conditions. You can filter by any field returned in the
            response; use the same field names and value forms as in the
            response. Use comparison operators (eq, ne, gt, gte, lt, lte, in,
            nin, contains, startsWith, endsWith, between) and combine multiple
            conditions with logical operators (and, or). Maximum length: 5120
            characters.
          examples:
            simple:
              summary: Filter by Workspace name
              description: Return Workspaces whose name contains the provided text.
              value: '{"field": "name", "op": "contains", "value": "sdi"}'
            complex-and:
              summary: Filter by platform and power state
              description: Return only Workspaces matching both conditions.
              value: >-
                {"and": [{"field": "platform_type", "op": "eq", "value":
                "windows"}, {"field": "power_state", "op": "eq", "value":
                "on"}]}
            complex-or-and:
              summary: Combine OR and AND conditions
              description: Match broker alternatives and require a healthy EDR state.
              value: >-
                {"and": [{"or": [{"field": "broker", "op": "eq", "value":
                "citrix_on-premises"}, {"field": "broker", "op": "eq", "value":
                "azure_virtual_desktop"}]}, {"field": "edr_status", "op": "eq",
                "value": "installed_working"}]}
      responses:
        '200':
          description: Paginated list of Workspaces successfully retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceListResponseV1'
              examples:
                workspace-list:
                  summary: Paginated list with one Workspace
                  value:
                    has_next: false
                    data:
                      - id: 22f5381aa25e89b73785ca34
                        organization_id: 155f78b81155f8ab327ef274
                        name: SDI04-001.org.terravex.net
                        related_environment: 1437d381972ce53252aabe72f053af7c
                        operating_system: Microsoft Windows Server 2022 Standard 21H2
                        serial_number: >-
                          40a70e53327456131ae3321135531ae87f655cbeab27f01134c7ef366a7f2402
                        ip_address: 172.30.113.115
                        os_update_num_pending: 5
                        reporting_group_id: 65f83219942714fc24f01435
                        flxmid: >-
                          50a70e53327456131ae5921135531ae87f639cbe5b27f09034c7ef366a7f2402
                        os_update_num_days_since_last: 183
                        total_ram: 8191
                        altitude: 0
                        antivirus: Windows Defender
                        antivirus_status: installed_working
                        bios_manufacturer: VMware, Inc.
                        bios_mode: UEFI
                        bios_version: P79 Ver. 6.00
                        bios_smbversion: '2.7'
                        bios_serialnumber: VMware-42 06 fd 7c 3a f4 af 1c-97 07 56 e2 07 67 d7 23
                        base_board_manufacturer: Intel Corporation
                        base_board_product: 440BX Desktop Reference Platform
                        base_board_version: A30
                        broker: citrix_on-premises
                        public_ip_city: Barcelona
                        flexxagent_version: 25.9.1.0
                        compliance_result: not_evaluated
                        compliance_last_execution: '2025-06-12T06:13:17.17Z'
                        domain_name: org.terravex.net
                        public_ip_country: ES
                        cores_count: '4'
                        edr_active_detections: false
                        edr_host_id: 11bbcc1e6e2c440aa8b7522a78a292ad
                        edr_status: installed_working
                        edr_version: 7.05.17706.0
                        current_subnet: 172.30.213.0/24
                        default_gateway: 172.30.213.1
                        device_kind: virtual
                        edr: CrowdStrike
                        ema_agent_version: ''
                        ema_endpoint_id: ''
                        embedded_controller_version: '255.255'
                        os_fast_startup: false
                        flexxanalyzer_config: configured
                        flexxanalyzer_version: 3.0.2
                        hypervisor: vmware_vsphere
                        ip_version: IPv4
                        public_ip_isp: Cloudflare, Inc.
                        iot_hub_config_sync_status: synced
                        is_amt_supported: false
                        is_laptop: false
                        is_physical: false
                        last_boot_duration: 20
                        last_restart_time: null
                        last_time: '2025-06-12T06:13:17.17Z'
                        last_windows_update: '2025-09-18T00:00:00.00Z'
                        last_autorepair: '2025-06-10T10:00:00.00Z'
                        latitude: 0
                        locale: English (United States)
                        longitude: 0
                        mac_address: 10-52-56-36-21-42
                        network_interface_type: unknown
                        os_build_number: 6.3.20348.4171
                        os_manufacturer: Microsoft Corporation
                        os_version: 10.0.20348.20348
                        ou: >-
                          OU=NonPersistent,OU=Workstations,OU=OPS914,DC=ops914,DC=terravex,DC=net
                        os_page_file: C:\pagefile.sys
                        os_page_file_space: 512
                        platform_role: Desktop
                        platform_type: windows
                        processor: >-
                          Intel(R) Xeon(R) Gold 6348 CPU @ 2.60GHz, 4 Core(s), 4
                          Logical Processors
                        public_ip: 19.27.129.141
                        os_reboot_pending: false
                        secure_boot_state: 'On'
                        system_model: VMware7,1
                        system_type: x64-based PC
                        os_time_zone: Romance Standard Time
                        user_name: Domain\user001
                        vm_type: workspace
                        windows_type: server
                        create_date: '2023-12-18T11:26:11.11Z'
                        last_deregistration_time: '2026-01-19T12:26:25.25Z'
                        encrypted_harddisks: partial
                        custom_field_01: testVal1
                        custom_field_02: testVal2
                        custom_field_03: '4'
                        custom_field_04: ''
                        custom_field_05: ''
                        custom_field_06: ''
                        custom_field_07: ''
                        custom_field_08: ''
                        custom_field_09: ''
                        custom_field_10: ''
                        flexxagent_type: unified
                        antivirus_version_number: 4.18.2104.5
                        related_location: C08D2228-E80A-4ADA-A75F-03E33E71D119
                        area: Development
                        custom_field_11: ''
                        custom_field_12: ''
                        custom_field_13: ''
                        custom_field_14: ''
                        custom_field_15: ''
                        custom_field_16: ''
                        custom_field_17: ''
                        custom_field_18: ''
                        custom_field_19: ''
                        custom_field_20: ''
                        department: Department
                        office: Office
                        last_custom_fields_update: '2025-12-24T11:24:51.51Z'
                        workspace_id: >-
                          6676aa0c1e9c850250a70e53327456131ae59211aa531ae87f639cbe5b27f09034c7e3366a7f2402
                        flexxanalyzer_proxy_uri: ''
                        iot_hub_name: idIot0e33d84fe5761e
                        flexxagent_status: stopped
                        boot_hard_disk_used_percentage: 34
                        last_connection_time: '2025-06-12T06:13:17.17Z'
                        network_signal: 0
                        num_alerts: 0
                        percent_cpu: 17
                        percent_ram: 0
                        power_state: 'off'
                        sessions_count: 0
                        used_system_disk_c: 34
                        wake_on_lan_mac: 10-50-56-56-51-12
                        wake_on_lan_subnet: 172.30.213.0/24
                        broker_status: disconnected
                        status: offline
                workspace-aggregate:
                  summary: Aggregated result by status
                  value:
                    has_next: false
                    data:
                      - status: online
                        count: 120
                        avg_percent_cpu: 17.4
                      - status: offline
                        count: 45
                        avg_percent_cpu: 3.1
        '400':
          $ref: '#/components/responses/BadRequest'
          description: Bad Request. Invalid pagination, sorting, or filters.
        '401':
          $ref: '#/components/responses/Unauthorized'
          description: Unauthorized - authentication required
        '404':
          $ref: '#/components/responses/NotFound'
          description: Organization not found
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    WorkspaceListResponseV1:
      type: object
      properties:
        has_next:
          type: boolean
        data:
          type: array
          items:
            $ref: '#/components/schemas/WorkspacePublicV1'
      required:
        - has_next
        - data
    WorkspacePublicV1:
      type: object
      description: Workspace resource.
      properties:
        id:
          type: string
          maxLength: 24
          pattern: ^[0-9a-f]{24}$
        organization_id:
          type: string
          nullable: true
          maxLength: 24
          pattern: ^[0-9a-f]{24}$
        name:
          type: string
          nullable: true
        related_environment:
          type: string
          nullable: true
        operating_system:
          type: string
          nullable: true
        serial_number:
          type: string
          nullable: true
        ip_address:
          type: string
          nullable: true
        os_update_num_pending:
          type: number
          nullable: true
        reporting_group_id:
          type: string
          nullable: true
        flxmid:
          type: string
          nullable: true
        os_update_num_days_since_last:
          type: number
          nullable: true
        total_ram:
          type: number
          nullable: true
        altitude:
          type: number
          nullable: true
        antivirus:
          type: string
          nullable: true
        antivirus_status:
          type: string
          nullable: true
          enum:
            - unknown
            - not_installed
            - installed_stopped
            - installed_working
          description: Antivirus status.
        bios_manufacturer:
          type: string
          nullable: true
        bios_mode:
          type: string
          nullable: true
        bios_version:
          type: string
          nullable: true
        bios_smbversion:
          type: string
          nullable: true
        bios_serialnumber:
          type: string
          nullable: true
        base_board_manufacturer:
          type: string
          nullable: true
        base_board_product:
          type: string
          nullable: true
        base_board_version:
          type: string
          nullable: true
        broker:
          type: string
          nullable: true
          enum:
            - no_broker_detected
            - azure_virtual_desktop
            - citrix_on-premises
            - citrix_daas
            - amazon_workspaces
            - vmware_horizon
            - parallels_ras
            - windows_365
            - rdsh
            - uds
            - unknown
          description: Type of broker.
        public_ip_city:
          type: string
          nullable: true
        flexxagent_version:
          type: string
          nullable: true
        compliance_result:
          type: string
          nullable: true
          enum:
            - not_evaluated
            - compliant
            - not_compliant
          description: Compliance result.
        compliance_last_execution:
          type: string
          nullable: true
        domain_name:
          type: string
          nullable: true
        public_ip_country:
          type: string
          nullable: true
        cores_count:
          type: string
          nullable: true
        edr_active_detections:
          type: boolean
          nullable: true
        edr_host_id:
          type: string
          nullable: true
        edr_status:
          type: string
          nullable: true
          enum:
            - unknown
            - not_installed
            - installed_stopped
            - installed_working
          description: EDR agent status.
        edr_version:
          type: string
          nullable: true
        current_subnet:
          type: string
          nullable: true
        default_gateway:
          type: string
          nullable: true
        device_kind:
          type: string
          nullable: true
          enum:
            - virtual
            - physical
          description: Device type (Virtual/Physical).
        edr:
          type: string
          nullable: true
        ema_agent_version:
          type: string
          nullable: true
        ema_endpoint_id:
          type: string
          nullable: true
        embedded_controller_version:
          type: string
          nullable: true
        os_fast_startup:
          type: boolean
          nullable: true
        flexxanalyzer_config:
          type: string
          nullable: true
          enum:
            - not_configured
            - disabled_in_workspace
            - configured
            - installed
            - not_compatible
          description: FlexxAnalyzer configuration.
        flexxanalyzer_version:
          type: string
          nullable: true
        hypervisor:
          type: string
          nullable: true
          enum:
            - unknown
            - physical
            - microsoft_azure
            - microsoft_hyper-v
            - vmware_vsphere
            - amazon_web_services
            - nutanix
            - citrix_hypervisor
            - oracle_cloud
            - google_cloud
          description: Hypervisor type.
        ip_version:
          type: string
          nullable: true
        public_ip_isp:
          type: string
          nullable: true
        iot_hub_config_sync_status:
          type: string
          nullable: true
          enum:
            - unknown
            - does_not_apply
            - synced
            - unsynced
          description: IoT Hub config sync status.
        is_amt_supported:
          type: boolean
          nullable: true
        is_laptop:
          type: boolean
          nullable: true
        is_physical:
          type: boolean
          nullable: true
        last_boot_duration:
          type: number
          nullable: true
        last_restart_time:
          type: string
          nullable: true
        last_time:
          type: string
          nullable: true
        last_windows_update:
          type: string
          nullable: true
        last_autorepair:
          type: string
          nullable: true
        latitude:
          type: number
          nullable: true
        locale:
          type: string
          nullable: true
        longitude:
          type: number
          nullable: true
        mac_address:
          type: string
          nullable: true
        network_interface_type:
          type: string
          nullable: true
          enum:
            - unknown
            - ethernet
            - wifi
            - mobile_network
            - other
          description: Network interface type.
        os_build_number:
          type: string
          nullable: true
        os_manufacturer:
          type: string
          nullable: true
        os_version:
          type: string
          nullable: true
        ou:
          type: string
          nullable: true
        os_page_file:
          type: string
          nullable: true
        os_page_file_space:
          type: number
          nullable: true
        platform_role:
          type: string
          nullable: true
        platform_type:
          type: string
          nullable: true
          enum:
            - windows
            - mac
            - android
            - linux
            - chromebook
            - ios
            - unknown
          description: Platform type.
        processor:
          type: string
          nullable: true
        public_ip:
          type: string
          nullable: true
        os_reboot_pending:
          type: boolean
          nullable: true
        secure_boot_state:
          type: string
          nullable: true
        system_model:
          type: string
          nullable: true
        system_type:
          type: string
          nullable: true
        os_time_zone:
          type: string
          nullable: true
        user_name:
          type: string
          nullable: true
        vm_type:
          type: string
          nullable: true
          enum:
            - hidden
            - workspace_or_avd_session_host
            - desktop_template_definition
            - vcc_role
            - template_definition_surrogate
            - workspace
            - server
            - vdi_appliance
            - application_template_definition
            - application_server
            - endpoint
          description: VM type.
        windows_type:
          type: string
          nullable: true
          enum:
            - unknown
            - workstation
            - domain controller
            - server
          description: Windows type.
        create_date:
          type: string
          nullable: true
        last_deregistration_time:
          type: string
          nullable: true
        encrypted_harddisks:
          type: string
          nullable: true
          enum:
            - 'no'
            - 'yes'
            - partial
            - n/a
          description: Hard disk encryption status.
        custom_field_01:
          type: string
          nullable: true
        custom_field_02:
          type: string
          nullable: true
        custom_field_03:
          type: string
          nullable: true
        custom_field_04:
          type: string
          nullable: true
        custom_field_05:
          type: string
          nullable: true
        custom_field_06:
          type: string
          nullable: true
        custom_field_07:
          type: string
          nullable: true
        custom_field_08:
          type: string
          nullable: true
        custom_field_09:
          type: string
          nullable: true
        custom_field_10:
          type: string
          nullable: true
        flexxagent_type:
          type: string
          nullable: true
          enum:
            - unified
            - mac
            - linux
            - universal
          description: FlexxAgent type.
        antivirus_version_number:
          type: string
          nullable: true
        related_location:
          type: string
          nullable: true
        area:
          type: string
          nullable: true
        custom_field_11:
          type: string
          nullable: true
        custom_field_12:
          type: string
          nullable: true
        custom_field_13:
          type: string
          nullable: true
        custom_field_14:
          type: string
          nullable: true
        custom_field_15:
          type: string
          nullable: true
        custom_field_16:
          type: string
          nullable: true
        custom_field_17:
          type: string
          nullable: true
        custom_field_18:
          type: string
          nullable: true
        custom_field_19:
          type: string
          nullable: true
        custom_field_20:
          type: string
          nullable: true
        department:
          type: string
          nullable: true
        office:
          type: string
          nullable: true
        last_custom_fields_update:
          type: string
          nullable: true
        workspace_id:
          type: string
          nullable: true
          minLength: 25
          pattern: ^[0-9a-f]{25,}$
        flexxanalyzer_proxy_uri:
          type: string
          nullable: true
        iot_hub_name:
          type: string
          nullable: true
        flexxagent_status:
          type: string
          nullable: true
          enum:
            - unknown
            - working
            - stopped
            - not reporting
            - service stopped
            - service disabled
            - communication error
            - other error
            - not_installed
            - update requested
            - updating
            - update error
          description: FlexxAgent/VDI client status.
        boot_hard_disk_used_percentage:
          type: number
          nullable: true
        last_connection_time:
          type: string
          nullable: true
        network_signal:
          type: number
          nullable: true
        num_alerts:
          type: number
          nullable: true
        percent_cpu:
          type: number
          nullable: true
          description: Workspace CPU usage percentage.
        percent_ram:
          type: number
          nullable: true
        power_state:
          type: string
          nullable: true
          enum:
            - unmanaged
            - unknown
            - dev express
            - 'off'
            - 'on'
            - suspended
            - turning on
            - turning off
            - suspending
            - resuming
            - non-reporting
          description: Power state.
        sessions_count:
          type: number
          nullable: true
        used_system_disk_c:
          type: number
          nullable: true
        wake_on_lan_mac:
          type: string
          nullable: true
        wake_on_lan_subnet:
          type: string
          nullable: true
        broker_status:
          type: string
          nullable: true
          enum:
            - warning
            - other
            - preparing_session
            - connected
            - active
            - disconnected
            - reconnecting
            - non-brokered session
            - error
            - unmanaged
            - unknown
            - unavailable
            - 'off'
            - 'on'
            - suspended
            - turning on
            - turning off
            - suspending
            - resuming
            - not reporting
            - unregistered
            - available
            - in use
            - maintenance or drain mode
          description: Broker status.
        status:
          type: string
          nullable: true
          enum:
            - online
            - offline
          description: Workspace connectivity status.
      required:
        - id
    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'
    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

````