Request
Basic information
| Field | Value |
|---|---|
| HTTP URL | https://api.dingtalk.io/v1.0/doc/workspaces/{workspaceId}/docs/{nodeId} |
| HTTP Method | DELETE |
| Supported app type | appType-Internal app |
| Required permission | permission-Document.WorkspaceDocument.Write-Knowledge Base document write permission |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
| x-acs-dingtalk-access-token | String | Yes | The access credential used to call this API. To obtain it, call the Get the access token of an internal app API. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workspaceId | String | Yes | The team space ID. To obtain it, call the Create a Knowledge Base API or the Get the Knowledge Base list API and use the value of the workspaceId field. |
| nodeId | String | Yes | The team space node ID. You can pass either a document ID or a folder ID. To obtain it, call the Create a Knowledge Base document API and use the value of the nodeId parameter. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| operatorId | String | Yes | The unionId of the user who initiates the delete request. To obtain it, call the Query user details API and use the value of the unionid parameter. |
Request example
HTTPResponse
Response body example
Error codes
If an error occurs when you call this API, look up the solution in the Global error codes document based on the error message.| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | invalidRequest.inputArgs.invalid | Method parameter validation failed | Method parameter validation failed. Check whether any required parameters are missing or whether the unionId is valid. |
| 400 | invalidRequest.workspaceNode.notInWorkspace | The node is not in the Knowledge Base | The node is not in the Knowledge Base. |
| 403 | forbidden.user.notInOrg | The operating user is not in the organization | The operating user is not in the organization. |
| 403 | forbidden.accessDenied | The user does not have operation permission | The user does not have operation permission. |
| 404 | invalidRequest.resource.notFound | The resource is not found | The Knowledge Base, node, or other resource is not found. |
| 404 | invalidRequest.document.deleted | The Knowledge Base node has been deleted | The Knowledge Base node has been deleted. |
| 404 | invalidRequest.workspace.deleted | The Knowledge Base has been deleted | The Knowledge Base has been deleted. |
| 500 | internalError | Internal system error | Internal system error. |