English
Query Effective Permission of a Resource
About 389 wordsAbout 1 min
2026-09-14
Description
Queries the current user's final effective permission level on a given knowledge resource (knowledge space or knowledge folder). For folders, the returned permission is the effective level inherited from the space and ancestor folders.
Request Specification
HTTP Method: POST + application/json
Request Path: https://${Cloud Domain}/cgi/crm/v2/knowledge/folder/effectivePermission?thirdTraceId=${Random String}
Request Headers: Refer to Common Parameters
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| data | Map | Yes | Data |
| resourceType | String | Yes | Resource type: SPACE knowledge space, CATEGORY knowledge folder. To query a folder, you must pass CATEGORY. SERVICE_KNOWLEDGE and other values are not supported for knowledge-entry permission |
| resourceId | String | Yes | Resource ID; must not be omitted or empty. Space ID for SPACE, or folderCode for CATEGORY |
Request Example
{
"data": {
"resourceType": "CATEGORY",
"resourceId": "16"
}
}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 |
| resourceId | String | Resource ID |
| permission | String | The current user's final permission level on the resource: MANAGE, EDIT, DOWNLOAD, VIEW, or NONE |
Response Example
{
"traceId": "E-O.fktest4234.1000-20260914112000-xxxxxx",
"errorDescription": "success",
"errorMessage": "success",
"errorCode": 0,
"data": {
"resourceId": "16",
"permission": "VIEW"
}
}Notes
- Permission levels from highest to lowest:
MANAGE>EDIT>DOWNLOAD>VIEW>NONE. A higher level implies the capabilities of lower levels (e.g.,DOWNLOADincludes viewing). NONEmeans the current user has no permission on the resource and must not be treated as viewable.- The external path contains
folder, butresourceTypestill acceptsSPACE(pass the space ID asresourceId). To query a folder, you must passresourceType=CATEGORYandresourceId=folderCode. - Omitting or leaving
resourceTypeorresourceIdempty returns a parameter error, notNONE. - This API supports knowledge spaces and knowledge folders only; querying effective permission of a knowledge entry is not supported. For
SERVICE_KNOWLEDGEor any other non-SPACE/CATEGORYvalue: ifresourceIdis present,permission=NONEis returned (this is not a real permission result); ifresourceIdis empty, a parameter error is returned. - The same permission-level enum is used by Batch Query Folder Permissions.
- Do not use the message field in the response for logical judgment, as errorMessage may change.
