DeleteLibrary
Delete a document library. ⚠️ This operation deletes the library and all its associated documents.
Operation description
Prerequisites- You have activated Alibaba Cloud Model Studio and Tongyi Dianjin services.
- Obtain the workspaceId: obtain the workspace identifier.
Try it now
You can directly run this API in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.
RAM authorization
The following table describes the authorization information of the API. You can use it in the Action element of a RAM policy statement to grant a RAM user or role the permission to call this API. Details are as follows:
-
Operation: the specific permission point.
-
Access level: the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: the resource types that support authorization in the operation. Details are as follows:
- For required resource types, an asterisk (*) is prefixed.
- For operations that do not support resource-level authorization,
All Resourcesis used.
-
Condition key: the condition keys defined by the cloud service itself.
-
Dependent operation: other permissions required to successfully perform the operation. The caller must also have the permissions of the dependent operations for the operation to succeed.
| Operation | Access level | Resource type | Condition key | Dependent operation |
|---|---|---|---|---|
| dianjin:DeleteLibrary | delete | *All Resources * |
| None |
Request syntax
DELETE /{workspaceId}/api/library/delete HTTP/1.1
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| workspaceId | string | Yes | Business space | llm-xxxxx |
| libraryId | string | Yes | Document library ID | skdfefxxx |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| object | Response data | ||
| errCode | string | Error code | 0 |
| message | string | Error message | ok |
| requestId | string | Request ID | 30F6AD44-F078-540D-B5A5-1E519C8E9E6D |
| success | boolean | Indicates whether the request is successful | true |
Examples
Success response example
JSON format
{
"errCode": 0,
"message": "ok",
"requestId": "30F6AD44-F078-540D-B5A5-1E519C8E9E6D",
"success": true
}
Error codes
Visit the Error Center to view more error codes.