---
title: "List a node's ancestor ids"
method: GET
path: "/api/v1/nodes/{nodeId}/ancestors"
tags: ["Nodes"]
---

# List a node's ancestor ids

`GET /api/v1/nodes/{nodeId}/ancestors`

## Request

- Base URL: `https://api-docs.busabase.com`
- URL: `https://api-docs.busabase.com/api/v1/nodes/{nodeId}/ancestors`
- Auth: none declared

## Path parameters

- `nodeId` string, required: Node id, or a slug that is unique within its type.

## Query parameters

- `type` 'folder' | 'base' | 'skill' | 'drive' | 'airapp' | 'file' | 'doc' | 'form' | 'whiteboard' | 'workflow' | 'html': Optional disambiguation hint, only needed when `nodeId` is a slug that exists under more than one node type.

## Response `200`

The node's ancestor ids, root-first, excluding the node itself (`[]` directly under the workspace root). `nodeId` accepts an id or a slug, same as `nodes.get`; pass `type` when a slug exists under more than one type. Lets a depth-bounded, lazily-expanded tree open straight to a deep node on a cold load (a refresh, a bookmark, a shared link) without one round trip per level.

- object
  - `ancestorIds` string[], required

---

[API](https://skmtc.dev/busabase/apis/busabase-api.md) · [All operations](https://skmtc.dev/busabase/apis/busabase-api/llms.txt) · [OpenAPI document](https://skmtc.dev/busabase/apis/busabase-api/revisions/bc6a7d5ff4c1?raw)
