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

# List Pending Tree

> Hierarchical pending-queue view (spec f33eb9ca — Layer 4 Pending Queue UI).

Returns a 5-level tree: Ideations → Refinements → Specs → Sprints →
Cards, each level annotated with aggregate status counters drawn from
`consolidation_queue`. The UI renders this via
`frontend/src/components/knowledge/PendingQueueTree.tsx` with lazy
expansion by level (BR `Tree Lazy Fetch por Nível`).

Payload shape (stable — consumed by React component):
    {
      "board_id": str,
      "total_pending": int,
      "levels": {ideations: {pending,in_progress,done,failed},
                 refinements: ..., specs: ..., sprints: ..., cards: ...},
      "tree": [ideation-nodes with nested children]
    }



## OpenAPI

````yaml /openapi.json get /api/v1/kg/boards/{board_id}/pending/tree
openapi: 3.1.0
info:
  description: >-
    Okto Pulse REST API schema generated from okto-pulse-core 0.2.0 source for
    docs.oktolabs.ai.
  title: Okto Pulse
  version: 0.2.0
servers: []
security: []
paths:
  /api/v1/kg/boards/{board_id}/pending/tree:
    get:
      tags:
        - knowledge-graph
        - knowledge-graph
      summary: List Pending Tree
      description: >-
        Hierarchical pending-queue view (spec f33eb9ca — Layer 4 Pending Queue
        UI).


        Returns a 5-level tree: Ideations → Refinements → Specs → Sprints →

        Cards, each level annotated with aggregate status counters drawn from

        `consolidation_queue`. The UI renders this via

        `frontend/src/components/knowledge/PendingQueueTree.tsx` with lazy

        expansion by level (BR `Tree Lazy Fetch por Nível`).


        Payload shape (stable — consumed by React component):
            {
              "board_id": str,
              "total_pending": int,
              "levels": {ideations: {pending,in_progress,done,failed},
                         refinements: ..., specs: ..., sprints: ..., cards: ...},
              "tree": [ideation-nodes with nested children]
            }
      operationId: list_pending_tree_api_v1_kg_boards__board_id__pending_tree_get
      parameters:
        - in: path
          name: board_id
          required: true
          schema:
            title: Board Id
            type: string
        - in: query
          name: depth
          required: false
          schema:
            default: 5
            maximum: 5
            minimum: 1
            title: Depth
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````