English
Batch Query Folder Permissions
About 353 wordsAbout 1 min
2026-09-14
Description
Queries, in batch, the current user's effective permission level on each visible knowledge folder within multiple knowledge spaces.
Request Specification
HTTP Method: POST + application/json
Request Path: https://${Cloud Domain}/cgi/crm/v2/knowledge/folder/permissions?thirdTraceId=${Random String}
Request Headers: Refer to Common Parameters
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| data | Map | Yes | Data |
| spaceIds | List[String] | Yes | List of knowledge space IDs; multiple spaces are supported in one call. The field must be present in the request body: omit it or pass null and the call returns a parameter error; pass [] and the result is an empty list |
Request Example
{
"data": {
"spaceIds": ["space-001", "space-002"]
}
}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 |
| folderPermissions | Array | Flat list of folder permissions |
| folderPermissions[].folderCode | String | Knowledge folder code |
| folderPermissions[].permission | String | The current user's final permission level on the folder; see Query Effective Permission of a Resource for values |
Response Example
{
"traceId": "E-O.fktest4234.1000-20260914113000-xxxxxx",
"errorDescription": "success",
"errorMessage": "success",
"errorCode": 0,
"data": {
"folderPermissions": [
{
"folderCode": "16",
"permission": "EDIT"
},
{
"folderCode": "17",
"permission": "VIEW"
}
]
}
}Notes
- Only folders accessible to the current user (
VIEWor above) are returned; inaccessible folders never appear in the result. spaceIdsmust not be omitted: a request body without the field (or an open-platform mapping that does not fill it) returns a parameter error. Passing[]passes validation and returns an empty list.minPermissionin the request body is ignored even if present; this API does not filter by that field.- When the same folder code exists in multiple spaces, permissions are merged and a single entry with the highest level is returned; the result order is not guaranteed stable, do not rely on it.
- The result is a flat list across spaces. For the folder hierarchy, use List Visible Knowledge Folders.
- Do not use the message field in the response for logical judgment, as errorMessage may change.
