---
title: "Get knowledge hub root nodes"
method: GET
path: "/knowledgeBase/knowledge-hub/nodes"
tags: ["Knowledge Base", "Knowledge Hub"]
deprecated: true
---

# Get knowledge hub root nodes

`GET /knowledgeBase/knowledge-hub/nodes`

> **Deprecated.**

Returns root-level nodes (connector apps and Collection apps) or, when
filters or search are applied, a flat list of matching nodes across the
entire knowledge hub tree.

**Overview**

The Knowledge Hub provides a unified view across all knowledge sources:
- **Collection** — locally uploaded knowledge bases (`origin: COLLECTION`)
- **Connector app** — external connector instances such as Google Drive,
  Slack, Confluence, Jira (`origin: CONNECTOR`)

Use this endpoint to build file-browser UIs and sidebar navigation trees.

**Browsing vs. searching**

When no filters or search query are provided, only top-level app nodes
are returned. Adding `nodeTypes`, `q`, or other filter params triggers a
search across the full tree, returning matching nodes regardless of depth.

For children of a specific node, use
`GET /knowledgeBase/knowledge-hub/nodes/{parentType}/{parentId}`.

**Pagination and sorting**

Results are always paginated. Default sort is `updatedAt` descending.
The `pagination` object in the response contains `hasNext` / `hasPrev`
flags suitable for infinite-scroll or page-based navigation.

**Expanding the response**

Use the `include` parameter to request additional sections:
- `availableFilters` — adds `filters.available` with all filter options
- `counts` — adds a `counts` summary broken down by node type
- `breadcrumbs` — adds the breadcrumb trail (empty at root level)
- `permissions` — adds the caller's permission flags

**Access control**

Requires a valid bearer token. For OAuth tokens the `kb:read` scope
must be present; regular JWT bearer tokens pass through without scope
enforcement.

## Query parameters

- `onlyContainers` boolean
- `page` integer
- `limit` integer
- `sortBy` 'name' | 'createdAt' | 'updatedAt' | 'size' | 'type'
- `sortOrder` 'asc' | 'desc'
- `q` string
- `nodeTypes` string
- `recordTypes` string
- `origins` string
- `connectorIds` string
- `indexingStatus` string
- `createdAt` string
- `updatedAt` string
- `size` string
- `include` string

## Response `200`

Paginated list of root hub nodes (connector apps and Collections).
HTTP 200 returns `success: true` and `error: null`. Field-level detail
and required keys are defined on `KnowledgeHubNodesResponse`.

Use `include` for optional sections: `availableFilters`, `counts`,
`permissions` — each stays JSON `null` when not asked for.
`breadcrumbs` stays `null` at this route (no parent in the path),
even if `include` lists `breadcrumbs`; use the child route for trails.
`id`, `currentNode`, and `parentNode` are `null` here.

- KnowledgeHubNodesResponse — Response body for the Knowledge Hub nodes API. The deployed service serialises optional values as JSON `null` and always includes the keys listed in `required` (Swagger / clients will see stable shapes, not omitted properties).
  - `success` true, required — Always `true` on HTTP 200. Failures use 4xx/5xx error envelopes, not this body shape.
  - `error` string, nullable, required — Always `null` on HTTP 200.
  - `id` string, nullable, required — Current parent node ID when browsing children; `null` at root.
  - `currentNode` object, nullable, required — Node being browsed when `parentId` is in the path; `null` at root.
    - `id` string, required
    - `name` string, required
    - `nodeType` string, required — One of `app`, `recordGroup`, `folder`, `record`.
    - `subType` string, nullable — Connector name or record type when applicable; otherwise `null`.
  - `parentNode` object, nullable, required — Parent of `currentNode` when present; `null` when not applicable.
    - `id` string, required
    - `name` string, required
    - `nodeType` string, required — One of `app`, `recordGroup`, `folder`, `record`.
    - `subType` string, nullable
  - `items` KnowledgeHubNode[], required — Page of nodes for the current browse or search.
    - `id` string, required — Unique identifier for the node.
    - `name` string, required — Display name of the node.
    - `nodeType` 'app' | 'recordGroup' | 'folder' | 'record', required — Type of the node (app, recordGroup, folder, or record).
    - `parentId` string, nullable, required — Parent node ID, or `null` at the root browse level.
    - `origin` 'COLLECTION' | 'CONNECTOR', required — Origin type.
    - `connector` string, nullable, required — Connector display name / key when applicable; otherwise `null`.
    - `recordType` string, nullable, required — Record type when `nodeType` is `record`; otherwise `null`.
    - `recordGroupType` string, nullable, required — Record group type when `nodeType` is `recordGroup`; otherwise `null`.
    - `indexingStatus` string, nullable, required — Indexing status when `nodeType` is `record`; otherwise `null`.
    - `reason` string, nullable, required — Failure or status reason when set; otherwise `null`.
    - `isInternal` boolean, required — True for internal/system nodes that do not originate from a source.
    - `createdAt` integer, required — Creation timestamp (epoch ms).
    - `updatedAt` integer, required — Update timestamp (epoch ms).
    - `sizeInBytes` integer, nullable, required — File size in bytes for file records; otherwise `null`.
    - `mimeType` string, nullable, required
    - `extension` string, nullable, required
    - `webUrl` string, nullable, required
    - `hasChildren` boolean, required — Whether the node has children (sidebar / tree).
    - `previewRenderable` boolean, nullable, required
    - `permission` object, nullable, required — Per-item permission when `include=permissions` is requested; otherwise `null`.
      - `role` string, required
      - `canEdit` boolean, required
      - `canDelete` boolean, required
    - `sharingStatus` string, nullable, required — Sharing status (e.g. `private`, `shared`, `team`, `workspace`) when applicable; otherwise `null`.
  - `pagination` object, required
    - `page` integer, required — Current page (1-indexed).
    - `limit` integer, required — Page size.
    - `totalItems` integer, required
    - `totalPages` integer, required
    - `hasNext` boolean, required
    - `hasPrev` boolean, required
  - `filters` object, required
    - `applied` object, required — Echo of applied filters; unused slots are JSON `null`.
      - `q` string, nullable, required
      - `nodeTypes` string[], nullable, required
      - `recordTypes` string[], nullable, required
      - `origins` string[], nullable, required
      - `connectorIds` string[], nullable, required
      - `indexingStatus` string[], nullable, required
      - `createdAt` DateRangeFilter, required — Date range filter with optional inclusive bounds (epoch ms).
        - `gte` integer, nullable — Greater-than-or-equal bound (epoch ms).
        - `lte` integer, nullable — Less-than-or-equal bound (epoch ms).
      - `updatedAt` DateRangeFilter, required — Date range filter with optional inclusive bounds (epoch ms).
        - `gte` integer, nullable — Greater-than-or-equal bound (epoch ms).
        - `lte` integer, nullable — Less-than-or-equal bound (epoch ms).
      - `size` SizeRangeFilter, required — Size range filter with optional inclusive bounds (bytes).
        - `gte` integer, nullable — Greater-than-or-equal bound (bytes).
        - `lte` integer, nullable — Less-than-or-equal bound (bytes).
      - `sortBy` string, required — Effective sort field after server normalisation.
      - `sortOrder` string, required — Effective sort order after server normalisation.
    - `available` object, nullable, required — Populated when `include=availableFilters`; otherwise `null`.
      - `nodeTypes` FilterOption[], required
        - `id` string, required — Filter ID value to send in requests.
        - `label` string, required — Display label for the filter.
        - `type` string, nullable — Additional type information (currently unused, may be null).
        - `connectorType` string, nullable — Connector type/name. Set only for entries in the `connectors` list.
      - `recordTypes` FilterOption[], required
        - `id` string, required — Filter ID value to send in requests.
        - `label` string, required — Display label for the filter.
        - `type` string, nullable — Additional type information (currently unused, may be null).
        - `connectorType` string, nullable — Connector type/name. Set only for entries in the `connectors` list.
      - `origins` FilterOption[], required
        - `id` string, required — Filter ID value to send in requests.
        - `label` string, required — Display label for the filter.
        - `type` string, nullable — Additional type information (currently unused, may be null).
        - `connectorType` string, nullable — Connector type/name. Set only for entries in the `connectors` list.
      - `connectors` FilterOption[], required
        - `id` string, required — Filter ID value to send in requests.
        - `label` string, required — Display label for the filter.
        - `type` string, nullable — Additional type information (currently unused, may be null).
        - `connectorType` string, nullable — Connector type/name. Set only for entries in the `connectors` list.
      - `indexingStatus` FilterOption[], required
        - `id` string, required — Filter ID value to send in requests.
        - `label` string, required — Display label for the filter.
        - `type` string, nullable — Additional type information (currently unused, may be null).
        - `connectorType` string, nullable — Connector type/name. Set only for entries in the `connectors` list.
      - `sortBy` FilterOption[], required
        - `id` string, required — Filter ID value to send in requests.
        - `label` string, required — Display label for the filter.
        - `type` string, nullable — Additional type information (currently unused, may be null).
        - `connectorType` string, nullable — Connector type/name. Set only for entries in the `connectors` list.
      - `sortOrder` FilterOption[], required
        - `id` string, required — Filter ID value to send in requests.
        - `label` string, required — Display label for the filter.
        - `type` string, nullable — Additional type information (currently unused, may be null).
        - `connectorType` string, nullable — Connector type/name. Set only for entries in the `connectors` list.
  - `breadcrumbs` object[], nullable, required — Present when `include=breadcrumbs`; otherwise `null`.
    - `id` string, required
    - `name` string, required
    - `nodeType` string, required — One of `app`, `recordGroup`, `folder`, `record`.
    - `subType` string, nullable
  - `counts` object, nullable, required — Present when `include=counts`; otherwise `null`.
    - `items` object[], required
      - `label` string, required
      - `count` integer, required
    - `total` integer, required
  - `permissions` object, nullable, required — Present when `include=permissions`; otherwise `null`.
    - `role` string, required
    - `canUpload` boolean, required
    - `canCreateFolders` boolean, required
    - `canEdit` boolean, required
    - `canDelete` boolean, required
    - `canManagePermissions` boolean, required

## Other responses

- `400` — Invalid request parameters. The backend's validation message is returned verbatim in `error.message`. See the examples below for the common triggers.
- `401` — Missing or invalid authentication token. The bearer token was absent, expired, malformed, or could not be verified by the auth middleware.
- `403` — Insufficient OAuth scope. Only applies to OAuth tokens. The token did not carry the `kb:read` scope required by this endpoint. Regular (non-OAuth) JWT bearer tokens are not subject to scope enforcement and will not receive this error.
- `500` — An unexpected error occurred on the server.

---

[API](https://skmtc.net/pipeshub-ai/apis/pipeshub-api.md) · [All operations](https://skmtc.net/pipeshub-ai/apis/pipeshub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pipeshub-ai/pipeshub-api/versions/abd27cfefc73/schema)
