> ## 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 connected to a location

> Returns a paginated list of workspaces (FWS devices) connected to the specified location through its network within the authorized organization scope (includes accessible delegated tenants). If the location does not exist within the authorized scope, respond with 404. If it exists but has no devices, respond with 200 and empty data. Aggregation is not available on this endpoint.



## OpenAPI

````yaml /en/api-reference/openapi.en-v2.json get /v2/organizations/{organization_id}/locations/{location_id}/connected-workspaces
openapi: 3.0.3
info:
  title: API Publica Portal
  version: 1.0.0
  description: Public REST API for portal
servers:
  - url: https://api.flexxible.net/
    description: Portal API
security:
  - bearerAuth: []
tags:
  - name: Solve
    description: Flexxible Solve ticket visibility and management
  - name: Digital activity
    description: Core process group creation by organization
  - name: Locations
    description: Location management (FWS)
  - name: Roles
    description: Role creation endpoint for organization
  - name: Users
    description: User creation endpoint for organization
  - name: Workspace groups
    description: Management endpoints for workspace groups
  - name: Networks
    description: Network management (FWS)
  - name: WiFi Networks
    description: Wi-Fi network management (FWS)
  - name: Workspaces
    description: Workspace deletion endpoint for the organization
  - name: Event logs
    description: Workspace event logs query
  - name: Installed apps
    description: Installed application detail endpoint for the organization
  - name: Authentication
    description: Session context and authentication endpoints
  - name: Microservices
    description: Details of microservices by organization
  - name: Operations
    description: Detail queries for operations by organization
  - name: Organization
    description: Organization operations
  - name: Patch policy targets
    description: Patch policy objective management endpoints
  - name: Product configurations
    description: Product configuration management endpoints
  - name: Reporting Groups
    description: Operations on reporting groups
  - name: Sessions
    description: Session detail endpoint for the organization
  - name: Tenants
    description: Tenant management endpoints
  - name: Workspace Connection Logs
    description: Workspace connection logs query
  - name: Workspace GPO
    description: Query GPOs applied to a session
  - name: Workspace Notifications
    description: Workspace notifications query
paths:
  /v2/organizations/{organization_id}/locations/{location_id}/connected-workspaces:
    get:
      tags:
        - Locations
      summary: List workspaces connected to a location
      description: >-
        Returns a paginated list of workspaces (FWS devices) connected to the
        specified location through its network within the authorized
        organization scope (includes accessible delegated tenants). If the
        location does not exist within the authorized scope, respond with 404.
        If it exists but has no devices, respond with 200 and empty data.
        Aggregation is not available on this endpoint.
      operationId: listLocationConnectedWorkspaces
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            minLength: 24
            maxLength: 24
          description: Organization identifier.
          example: 507f1f77bcf86cd799439011
        - name: location_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Location Id (FWS Location.Oid).
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
            minimum: 1
          description: Page number.
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            default: 100
            minimum: 1
            maximum: 100
          description: Number of items per page.
        - name: fields
          in: query
          required: false
          schema:
            type: string
            maxLength: 2048
          description: Response fields separated by commas for each element.
          example: id,location_id,network_id,organization_id
        - name: filters
          in: query
          required: false
          schema:
            type: string
            maxLength: 5120
          description: >-
            JSON expression filters for filterable fields of the resource
            (location_id, network_id, organization_id).
          examples:
            simple:
              summary: Filter by device organization
              value: >-
                {"field":"organization_id","op":"eq","value":"507f1f77bcf86cd799439011"}
            complex-and:
              summary: Filter by network and organization
              value: >-
                {"and":[{"field":"network_id","op":"eq","value":"c3d4e5f6-a7b8-9012-cdef-123456789012"},{"field":"organization_id","op":"eq","value":"507f1f77bcf86cd799439011"}]}
        - name: sort
          in: query
          required: false
          schema:
            type: string
            pattern: ^([a-z_]+):(asc|desc)$
          description: >-
            Sorting expression with format <field>:asc|desc. Sortable fields:
            location_id, network_id, organization_id. Default
            organization_id:asc.
          example: organization_id:asc
      responses:
        '200':
          description: Connected workspaces retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListLocationConnectedWorkspacesResponseV2'
              examples:
                paginated_result:
                  summary: Paginated list with results
                  value:
                    has_next: false
                    data:
                      - id: 507f1f77bcf86cd799439012
                        location_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                        network_id: c3d4e5f6-a7b8-9012-cdef-123456789012
                        organization_id: 507f1f77bcf86cd799439011
                empty_result:
                  summary: Existing location without devices
                  value:
                    has_next: false
                    data: []
        '400':
          description: Invalid request parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not authorized or without access to the organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Location not found within the authorized organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ListLocationConnectedWorkspacesResponseV2:
      type: object
      properties:
        has_next:
          type: boolean
          description: Indicates if there's a next page.
        data:
          type: array
          items:
            $ref: '#/components/schemas/LocationConnectedWorkspaceItemV2'
      required:
        - has_next
        - data
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
            details:
              type: string
          required:
            - message
            - code
      required:
        - error
    LocationConnectedWorkspaceItemV2:
      type: object
      properties:
        id:
          type: string
          nullable: true
          pattern: ^[0-9a-f]{24}$
          minLength: 24
          maxLength: 24
          description: >-
            Workspace Portal Id (Mongo _id). Null if FWS device has no match in
            Portal.
        location_id:
          type: string
          format: uuid
          nullable: true
          description: FWS location Id (Network.RelatedLocation / Location.Oid).
        network_id:
          type: string
          format: uuid
          nullable: true
          description: >-
            FWS network Id through which the device is connected to the
            location.
        organization_id:
          type: string
          nullable: true
          pattern: ^[0-9a-f]{24}$
          minLength: 24
          maxLength: 24
          description: >-
            Device's Portal organization Id (SWSTenant.PortalOrganizationId via
            ReportingGroup).
      required:
        - location_id
        - network_id
        - organization_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````