Request
Basic information
| Field | Value |
|---|---|
| HTTP URL | https://api.dingtalk.io/v2.0/wiki/workspaces/{workspaceId} |
| HTTP Method | GET |
| Supported app types | appType-Internal app appType-Third-party enterprise app |
| Permission required | permission-Wiki.Workspace.Read-Knowledge Base read permission |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
| x-acs-dingtalk-access-token | String | Yes | The access credential for calling this API. - For an internal app, call the Get the access token of an internal app API to obtain it. - For a third-party enterprise app, call the Get the access token of an authorized organization for a third-party app API to obtain it. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workspaceId | String | Yes | The Knowledge Base ID: - For an internal app, call the Get Knowledge Base list API to obtain the workspaceId field in the response. - For a third-party enterprise app, call the Get Knowledge Base list API to obtain the workspaceId field in the response. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| withPermissionRole | Boolean | No | Whether to retrieve permission information: - true: retrieve - false: do not retrieve Default: false. |
| operatorId | String | Yes | The unionId of the operator. |
Request example
HTTPResponse
Response body
| Name | Type | Description |
|---|---|---|
| workspace | Object | The Knowledge Base. |
| workspaceId | String | The Knowledge Base ID (spaceUuid). |
| corpId | String | The organization ID that the Knowledge Base belongs to. |
| teamId | String | The ID of the Knowledge Group that the Knowledge Base belongs to. Empty if not associated with any Knowledge Group. |
| rootNodeId | String | The root node ID (root dentryUuid). |
| name | String | The name of the Knowledge Base. |
| type | String | The Knowledge Base type. Enum values: - TEAM: Knowledge Base - PERSONAL: My Docs |
| description | String | The description of the Knowledge Base. |
| url | String | The access URL of the Knowledge Base. |
| icon | Object | The icon of the Knowledge Base. |
| type | String | The icon type. Enum values: - URL: link - EMOJI: emoji icon |
| value | String | The icon value: - When type is URL, returns the icon link. - When type is EMOJI, returns the Unicode value of the emoji icon. |
| cover | String | The cover URL of the Knowledge Base. |
| creatorId | String | The userId of the Knowledge Base creator. |
| modifierId | String | The userId of the Knowledge Base modifier. |
| createTime | String | The created time of the Knowledge Base. |
| modifiedTime | String | The modified time of the Knowledge Base. |
| permissionRole | String | The permission role of the requester on the Knowledge Base. Enum values: - OWNER: Owner - MANAGER: Manager - EDITOR: Editor - DOWNLOADER: Viewer with download permission - READER: Viewer only - NONE: No permission |
Response body example
Error codes
If an error occurs when calling this API, refer to the Global error codes document to find a solution based on the error message.| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | paramError | %s | Parameter error |
| 400 | isNotWorkspace | %s | Not a Knowledge Base |
| 403 | permissionDenied | %s | The current user does not have permission for this action |
| 404 | workspaceNotExist | %s | Knowledge Base does not exist |
| 500 | systemError | %s | Service busy. Try again later |
| 500 | unknownError | Unknown Error | Unknown error |
| 503 | operationTimeout | %s | Request timed out |