> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oasm.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Workspaces

> Fetches a comprehensive list of security workspaces that the authenticated user has access to, providing multi-tenant organization capabilities.



## OpenAPI

````yaml /api-reference/openapi.json get /api/workspaces
openapi: 3.0.0
info:
  title: Open Attack Surface Management
  description: Open-source platform for cybersecurity Attack Surface Management (ASM)
  version: '1.0'
  contact: {}
servers:
  - url: https://{baseUrl}/api/v1
    variables:
      baseUrl:
        default: localhost:3000
        description: API server hostname with port (e.g. localhost:3000, api.example.com)
security: []
tags: []
externalDocs:
  description: Authentication Docs
  url: auth/docs
paths:
  /api/workspaces:
    get:
      tags:
        - Workspaces
      summary: Get Workspaces
      description: >-
        Fetches a comprehensive list of security workspaces that the
        authenticated user has access to, providing multi-tenant organization
        capabilities.
      operationId: WorkspacesController_getWorkspaces
      parameters:
        - name: search
          required: false
          in: query
          schema:
            type: string
        - name: page
          required: false
          in: query
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          schema:
            example: 10
            type: number
        - name: sortBy
          required: false
          in: query
          schema:
            example: createdAt
            type: string
        - name: sortOrder
          required: false
          in: query
          schema:
            example: DESC
            type: string
        - name: isArchived
          required: false
          in: query
          description: Whether to archive (true) or unarchive (false) the workspace
          schema:
            type: boolean
            example: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetManyWorkspaceResponseDtoDto'
                allOf:
                  - $ref: '#/components/schemas/AppResponseSerialization'
components:
  schemas:
    GetManyWorkspaceResponseDtoDto:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WorkspaceResponseDto'
        total:
          type: number
        page:
          type: number
        limit:
          type: number
        hasNextPage:
          type: boolean
        pageCount:
          type: number
      required:
        - data
        - total
        - page
        - limit
        - hasNextPage
        - pageCount
    WorkspaceResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Workspace ID
        name:
          type: string
          description: Workspace name
        description:
          type: object
          description: Workspace description
          nullable: true
        createdAt:
          format: date-time
          type: string
          description: Creation timestamp
        updatedAt:
          format: date-time
          type: string
          description: Last update timestamp
        archivedAt:
          type: object
          description: Archival timestamp
          nullable: true
        isAssetsDiscovery:
          type: boolean
          description: Whether asset discovery is enabled
        isAutoEnableAssetAfterDiscovered:
          type: boolean
          description: Whether assets are auto-enabled after discovery
        ownerId:
          type: string
          description: Owner user ID
        targetCount:
          type: number
          description: Number of targets in the workspace
          example: 10
        memberCount:
          type: number
          description: Number of members in the workspace
          example: 5
        role:
          type: string
          description: Role of the current user in the workspace
          enum:
            - owner
            - member
          example: owner
        workspaceMembers:
          type: array
          description: Members of the workspace
          items:
            type: object
            properties:
              id:
                type: string
              role:
                type: string
                enum:
                  - owner
                  - member
              user:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  image:
                    type: string
                    nullable: true
              createdAt:
                format: date-time
                type: string
              updatedAt:
                format: date-time
                type: string
          example:
            - id: member-uuid
              role: owner
              user:
                id: user-uuid
                name: John Doe
                image: null
      required:
        - id
        - name
        - createdAt
        - updatedAt
        - isAssetsDiscovery
        - isAutoEnableAssetAfterDiscovered
        - ownerId
        - targetCount
        - memberCount
        - role
        - workspaceMembers

````