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

# Get Tree



## OpenAPI

````yaml /openapi.json get /v1/workspaces/{workspaceId}/categories
openapi: 3.1.0
info:
  title: Specurate API
  description: ''
  version: 1.0.0
  contact: {}
servers:
  - url: https://app.specurate.com/api
    description: API Server
security: []
tags: []
paths:
  /v1/workspaces/{workspaceId}/categories:
    get:
      tags:
        - Workspace Categories
      summary: Get Tree
      operationId: WorkspaceCategoriesController_getTree_v1
      parameters:
        - name: workspaceId
          required: true
          in: path
          schema:
            type: string
            pattern: ^\d+$
        - name: segmentId
          required: false
          in: query
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceCategoriesTreeResponseDto'
components:
  schemas:
    WorkspaceCategoriesTreeResponseDto:
      type: object
      properties:
        categoryOrderRevision:
          type: number
        segments:
          type: array
          items:
            $ref: '#/components/schemas/SegmentResponseDto'
        categories:
          type: array
          items:
            $ref: '#/components/schemas/WorkspaceCategoryNodeDto'
      required:
        - categoryOrderRevision
        - segments
        - categories
    SegmentResponseDto:
      type: object
      properties:
        id:
          type: string
        key:
          type: string
          enum:
            - architectural
            - finishes
            - ffe
            - ose
        name:
          type: string
      required:
        - id
        - key
        - name
    WorkspaceCategoryNodeDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        code:
          type: string
          nullable: true
        segmentId:
          type: string
        active:
          type: boolean
        position:
          type: number
        productTypes:
          type: array
          items:
            $ref: '#/components/schemas/WorkspaceCategoryProductTypeSummaryDto'
        counts:
          $ref: '#/components/schemas/WorkspaceCategoryCountsDto'
      required:
        - id
        - name
        - code
        - segmentId
        - active
        - position
        - productTypes
        - counts
    WorkspaceCategoryProductTypeSummaryDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        position:
          type: number
        code:
          type: string
          nullable: true
      required:
        - id
        - name
        - position
        - code
    WorkspaceCategoryCountsDto:
      type: object
      properties:
        activeProductTypes:
          type: number
        totalProductTypes:
          type: number
        enabledAttributeAssignments:
          type: number
      required:
        - activeProductTypes
        - totalProductTypes
        - enabledAttributeAssignments

````