List Permission Information¶
GET /api/v1/permission/list
Overview¶
Reads the permission catalog available for role configuration in the target workspace.
Before You Begin and Usage Steps¶
To configure a custom role, use isSupportCustomRole=true to get the selectable permission items, then read the keys in subs. The response contains the permission catalog and applicable scope; to query the permissions granted to a role, read that role's details.
Select the OpenAPI address of the site your workspace belongs to from the Site Domain Table.
Request Headers¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| DF-API-KEY | string | Y | OpenAPI Key credential for the workspace. Use the full key value, not the UUID of the API Key record. Example: <DF-API-KEY>How to obtain or fill in: Create or obtain a Key with permissions for this API in the API Key management of the target workspace. |
Query Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| isSupportCustomRole | boolean | If omitted, no filtering is applied; true returns only permission items that support custom roles, false returns only unsupported items. Groups without matching items are omitted. Allows null: False Example: trueHow to obtain or fill in: Choose whether to display only the permissions that can be configured for custom roles, as required by the form. |
Additional Parameter Notes¶
The workspace is determined by the DF-API-KEY in the request.
Request Example¶
curl --get -H "DF-API-KEY: <DF-API-KEY>" \
"https://openapi.guance.com/api/v1/permission/list" \
--data-urlencode "isSupportCustomRole=true"
Response¶
HTTP 200, application/json.
| Field | Type | Description |
|---|---|---|
| content | array<object> |
Results on this page; an empty array when there are no records. |
| content[].key | string | Permission identifier, which may appear in the permissions of role details. |
| content[].name | string | Permission display name. |
| content[].desc | string | Description of the permission's function. |
| content[].disabled | integer | Unselectable flag. 0 when the permission can be selected for custom roles; otherwise 1. |
| content[].forbidWorkspaceVersion | array<string> |
Workspace versions configured as disabled. |
| content[].isSupportOwner | integer | Whether it applies to the owner. 1 means supported, 0 means not supported. |
| content[].isSupportWsAdmin | integer | Whether it applies to the administrator. 1 means supported, 0 means not supported. |
| content[].isSupportGeneral | integer | Whether it applies to standard members. 1 means supported, 0 means not supported. |
| content[].isSupportReadOnly | integer | Whether it applies to read-only members. 1 means supported, 0 means not supported. |
| content[].isSupportAgent | integer | Whether it applies to the invited agent identity. 1 means supported, 0 means not supported. |
| content[].isSupportCustomRole | integer | Whether it can be selected for custom roles. 1 means supported, 0 means not supported. |
| content[].subPermission | array<string> or string |
Other permission identifiers it depends on. Can be an empty string or empty array when there are no dependencies. |
| content[].subs | array<object> |
Permission items in this group that match the filter conditions. |
| content[].declaration | object or null | Workspace declaration; common information for non-empty results. |
| content[].subs[].key | string | Permission identifier, which may appear in the permissions of role details. |
| content[].subs[].name | string | Permission display name. |
| content[].subs[].desc | string | Description of the permission's function. |
| content[].subs[].disabled | integer | Unselectable flag. 0 when the permission can be selected for custom roles; otherwise 1. |
| content[].subs[].forbidWorkspaceVersion | array<string> |
Workspace versions configured as disabled. |
| content[].subs[].isSupportOwner | integer | Whether it applies to the owner. 1 means supported, 0 means not supported. |
| content[].subs[].isSupportWsAdmin | integer | Whether it applies to the administrator. 1 means supported, 0 means not supported. |
| content[].subs[].isSupportGeneral | integer | Whether it applies to standard members. 1 means supported, 0 means not supported. |
| content[].subs[].isSupportReadOnly | integer | Whether it applies to read-only members. 1 means supported, 0 means not supported. |
| content[].subs[].isSupportAgent | integer | Whether it applies to the invited agent identity. 1 means supported, 0 means not supported. |
| content[].subs[].isSupportCustomRole | integer | Whether it can be selected for custom roles. 1 means supported, 0 means not supported. |
| content[].subs[].subPermission | array<string> or string |
Other permission identifiers it depends on. Can be an empty string or empty array when there are no dependencies. |
{
"code": 200,
"content": [
{
"key": "workspace.*",
"name": "Workspace",
"desc": "",
"subPermission": "",
"disabled": 1,
"subs": [
{
"key": "workspace.memberManage",
"name": "Member Management",
"desc": "Manage workspace members",
"subPermission": "",
"disabled": 0,
"isSupportCustomRole": 1
}
],
"isSupportCustomRole": 0,
"declaration": null
}
],
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Response¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Handling |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | An undeclared Query parameter is passed | The message indicates the invalid parameter. | Remove fields not listed in the parameter table. |
| 406 | ft.NotFoundWorkspace | The workspace corresponding to the API Key cannot be found | The workspace does not exist. | Verify that the workspace the Key belongs to is valid. |