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

# Recuperar un espai de treball

> Recupera informació detallada sobre un Workspace específic.



## OpenAPI

````yaml /ca/api-reference/openapi.ca-v1.json get /v1/organizations/{organization_id}/workspaces/{workspace_id}
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}/workspaces/{workspace_id}:
    get:
      tags:
        - Workspaces
      summary: Recuperar un espai de treball
      description: Recupera informació detallada sobre un Workspace específic.
      operationId: getWorkspaceById
      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
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            maxLength: 24
            pattern: ^[0-9a-f]{24}$
          description: L'identificador únic del Workspace
          example: 507f1f77bcf86cd799439020
      responses:
        '200':
          description: Detalls del Workspace recuperats correctament.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacePublicV1'
              examples:
                workspace-details:
                  summary: Informació detallada del Workspace
                  value:
                    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: online
        '400':
          $ref: '#/components/responses/BadRequest'
          description: 'Sol·licitud incorrecta: el format de l''ID de Workspace no és vàlid'
        '401':
          $ref: '#/components/responses/Unauthorized'
          description: 'No autoritzat: es requereix autenticació'
        '404':
          $ref: '#/components/responses/NotFound'
          description: Workspace no trobat
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    WorkspacePublicV1:
      type: object
      description: Recurs Workspace.
      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: Estat de l'antivirus.
        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: Tipus de 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: Resultat de compliment.
        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: Estat de l'agent EDR.
        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: Tipus de dispositiu (Virtual/Físic).
        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: Configuració de FlexxAnalyzer.
        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: Tipus d'hipervisor.
        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: Estat de sincronització de configuració d'IoT Hub.
        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: Tipus d'interfície de xarxa.
        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: Tipus de plataforma.
        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: Tipus de VM.
        windows_type:
          type: string
          nullable: true
          enum:
            - unknown
            - workstation
            - domain_controller
            - server
          description: Tipus de Windows.
        create_date:
          type: string
          nullable: true
        last_deregistration_time:
          type: string
          nullable: true
        encrypted_harddisks:
          type: string
          nullable: true
          enum:
            - 'no'
            - 'yes'
            - partial
            - na
          description: Estat de xifratge del disc dur.
        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: Tipus de FlexxAgent.
        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: Estat del FlexxAgent / client VDI.
        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: Ús de la CPU del Workspace en percentatge.
        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: Estat de l'energia.
        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
            - inuse
            - maintenance_or_drain_mode
          description: Estat del broker.
        status:
          type: string
          nullable: true
          enum:
            - online
            - offline
          description: Estat de connectivitat del workspace.
      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: 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'
    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

````