English
List Visible Knowledge Folders
About 526 wordsAbout 2 min
2026-09-14
Description
Queries the knowledge folders visible to the current user within a given knowledge space, level by level: when parentFolderCode is omitted, the root-level folders are returned; when provided, the direct children of that parent folder are returned.
Request Specification
HTTP Method: POST + application/json
Request Path: https://${Cloud Domain}/cgi/crm/v2/knowledge/folder/list?thirdTraceId=${Random String}
Request Headers: Refer to Common Parameters
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| data | Map | Yes | Data |
| spaceId | String | Yes | Knowledge space ID; obtain it via List Visible Knowledge Spaces |
| parentFolderCode | String | No | Parent folder code. Empty means root-level folders; non-empty returns the direct children of that parent |
Request Example
{
"data": {
"spaceId": "space-001"
}
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
| traceId | string | Unique request ID |
| errorDescription | string | Error description |
| errorMessage | string | Error message |
| errorCode | Int | Error Codes |
| data | object | Response data |
| nodes | Array | Visible folder nodes on the current level |
| nodes[].folderCode | String | Knowledge folder code |
| nodes[].name | String | Folder name |
| nodes[].parentFolderCode | String | Parent folder code; always null at the root level |
| nodes[].level | Int | Hierarchy level; the root level is 1 |
| nodes[].categorySource | String | Folder source: UN_SYSTEM_INTEGRATION for folders created in-house or not linked to an external system; otherwise an integration source code (e.g. KnowledgeArticleObj, NetworkDisk, WebPage) |
| nodes[].category_id | String | Associated category ID |
| nodes[].pid | String | Parent category ID |
| nodes[].space_id | String | ID of the space the folder actually belongs to |
| nodes[].orderField | Int | Sort order within the current level |
| nodes[].hasChildren | Boolean | Whether the node has visible sub-folders |
| nodes[].shortcut | Boolean | Whether the node is in a shortcut expansion context (not a display type) |
| nodes[].nodeType | String | Node type: FOLDER normal folder, SHORTCUT shortcut. Only root-level shortcut entry nodes are SHORTCUT |
| nodes[].permission | String | The current user's permission level on the folder; see Query Effective Permission of a Resource for values |
Response Example
{
"traceId": "E-O.fktest4234.1000-20260914121000-xxxxxx",
"errorDescription": "success",
"errorMessage": "success",
"errorCode": 0,
"data": {
"nodes": [
{
"folderCode": "16",
"name": "Installation Guides",
"parentFolderCode": null,
"level": 1,
"categorySource": "UN_SYSTEM_INTEGRATION",
"category_id": "67f1xxxx",
"pid": null,
"space_id": "space-001",
"orderField": 1,
"hasChildren": true,
"shortcut": false,
"nodeType": "FOLDER",
"permission": "VIEW"
}
]
}
}Notes
- This API queries level by level. Use
hasChildrenin the response to decide whether to query the next level with the node'sfolderCodeasparentFolderCode. Folder depth supports at most 10 levels by default. - Only nodes visible to the current user are returned; invisible folders never appear in the result. When the user has no VIEW permission on the space or the parent folder, an empty
nodesarray is returned and the call still succeeds. - A
SHORTCUTnode points to another folder; itsspace_idrefers to the space it actually belongs to. - To query knowledge entries under a folder, use List Knowledge Entries with an
INfilter on thecategoryfield. - Do not use the message field in the response for logical judgment, as errorMessage may change.
