> ## Documentation Index
> Fetch the complete documentation index at: https://cubed3-feat-druid-driver-streaming.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List folder ancestors

Return the ancestor chain of a folder, ordered from the workspace root down to (and including) the folder itself.

Use this to render a breadcrumb path for a nested folder. For example, for `Root / Sales / Q1` requested on the `Q1` folder, the response is `[Root, Sales, Q1]`.

Requires visibility access to the target folder. Returns `404` if the folder does not exist or belongs to a different deployment.


## OpenAPI

````yaml /api-reference/api.yaml get /v1/deployments/{deploymentId}/folders/{folderId}/ancestors
openapi: 3.1.0
info:
  title: Cube Cloud REST API
  version: 1.0.0
  description: >-
    Programmatically manage Cube Cloud: deployments and everything scoped to
    them

    (environments, folders, reports, workbooks, notifications, workspace, and
    agents),

    plus account-level users, groups, policies, embedding, and AI settings.
servers:
  - url: https://{tenant}.cubecloud.dev/api
    description: >-
      Cube Cloud API base URL. Replace the whole host if you use a custom
      domain.
    variables:
      tenant:
        default: your-tenant
        description: Your Cube Cloud tenant subdomain
security:
  - bearerAuth: []
tags:
  - name: Deployments
  - name: Environments
  - name: Folders
  - name: Reports
  - name: Workbooks
  - name: Notifications
  - name: Workspace
  - name: App Theme
  - name: Embed
  - name: Embed Tenants
paths:
  /v1/deployments/{deploymentId}/folders/{folderId}/ancestors:
    get:
      tags:
        - Folders
      summary: List folder ancestors
      operationId: getFolderAncestors
      parameters:
        - in: path
          name: deploymentId
          required: true
          schema:
            type: number
        - in: path
          name: folderId
          required: true
          schema:
            type: number
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Folder'
                type: array
          description: ''
components:
  schemas:
    Folder:
      properties:
        createdAt:
          oneOf:
            - format: date
              type: string
            - format: date-time
              type: string
        createdBy:
          type: integer
        deploymentId:
          type: integer
        id:
          type: integer
        name:
          type: string
        parentId:
          oneOf:
            - type: integer
            - type: 'null'
        position:
          type: integer
        type:
          $ref: '#/components/schemas/FolderDtoType'
        updatedAt:
          oneOf:
            - format: date
              type: string
            - format: date-time
              type: string
        updatedBy:
          oneOf:
            - type: integer
            - type: 'null'
      required:
        - name
        - position
        - id
        - deploymentId
        - createdAt
        - updatedAt
        - type
      type: object
    FolderDtoType:
      enum:
        - FOLDER
        - WORKBOOK
        - REPORT
      type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Token authentication. Send `Authorization: Bearer <YOUR_TOKEN>`.'

````