Request
Basic information
| Field | Value |
|---|---|
| HTTP URL | https://api.dingtalk.io/v1.0/doc/workbooks/{workbookId}/sheets/{sheetId} |
| HTTP Method | DELETE |
| Supported app types | appType-Internal app appType-Third-party enterprise app |
| Required permissions | permission-Document.Workbook.Write-Spreadsheet write permission |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
| x-acs-dingtalk-access-token | String | Yes | The access credential for calling this API. Obtain it as follows: - For an internal app, call the Get the access token of an internal app API. - For a third-party enterprise app, call the Get the access token of an organization authorized to a third-party app API. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workbookId | String | Yes | The spreadsheet file ID. The nodeId(dentryUuid) returned by the Knowledge Base API is the workbookId of the spreadsheet. Obtain it by calling the Get a node and Create a Knowledge Base document APIs. |
| sheetId | String | Yes | The worksheet ID or name. - For an internal app, call the Get all worksheets API to obtain the value of the id or name parameter. - For a third-party enterprise app, call the Create a worksheet API to obtain the id and name. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| operatorId | String | Yes | The unionId of the operator. Call the Query user details API to obtain it. If the operator has no permission, the API returns the error The operator has no permission. |
Request example
HTTPResponse
Response body
| Name | Type | Description |
|---|---|---|
| success | Boolean | Whether the deletion succeeded. true indicates success. |
Response body example
Error codes
If the API call returns an error, look up the solution in the Global error codes document based on the error message.| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | invalidRequest.inputArgs.workbookIdIllegal | The workbookId is illegal. | The workbookId is invalid. |
| 400 | invalidRequest.inputArgs.operatorIdIllegal | The operatorId is illegal. | The operatorId is invalid. |
| 400 | invalidRequest.inputArgs.invalid | %s | The request parameter is invalid. See the error message for details. |
| 403 | forbidden.operationIllegal | %s | The requested operation is invalid. See the error message for details. |
| 403 | forbidden.accessDenied | The operator has no permission. | The current user does not have permission for this operation. |
| 403 | forbidden.document.sizeOverLimit | The document size is over limit and the server is unable to complete your request. Retry is unlikely to work unless the document size is decreased. | The spreadsheet content is too large. Reduce the spreadsheet content and try again. |
| 404 | invalidRequest.resource.notFound | %s | The request failed. The requested resource cannot be found. |
| 500 | internalError | The server encountered an internal error and was unable to complete your request. Please try again later. | Internal server error. Try again later. |
| 503 | serviceBusy | The server is busy and unable to complete your request. Please try again later. | The service is busy. Try again later. |