Permanently deletes a specified knowledge base.
Operation description
- RAM users (sub-accounts) must first obtain the API permissions for Alibaba Cloud Model Studio (requiring AliyunBailianDataFullAccess, which includes the sfm:DeleteIndex permission) and join a workspace before they can call this operation. Alibaba Cloud accounts (primary accounts) can call this operation directly without authorization. We recommend that you call this operation through the latest Alibaba Cloud Model Studio SDK.
- Before you call this operation, make sure that your knowledge base has been created and has not been deleted (that is, the knowledge base ID IndexId is valid).
- If the knowledge base is being called by an application, you must disassociate it before you can delete it. Currently, this can only be done through the console. For more information, see Knowledge base.
- The deletion operation is irreversible. A deleted knowledge base cannot be recovered. Proceed with caution.
- Calling this operation does not delete files that have been imported into application data.
- This operation is idempotent.
Try it now
You can run this operation directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.
Try it now
RAM authorization
The following table describes the authorization information for this API. You can use it in the Action element of a RAM permission policy statement to grant RAM users or RAM roles the permission to call this API. Details are as follows:
- Action: refers to the specific permission point.
- Access level: refers to the access level of each operation. Valid values: Write, Read, and List.
-
Resource type: refers to the resource types that support authorization for the operation. Details are as follows:
- For required resource types, an asterisk (*) is added as a prefix.
- For operations that do not support resource-level authorization,
All resourcesis used.
- Condition key: refers to the condition keys defined by the cloud service itself.
- Dependent action: refers to other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| sfm:DeleteIndex | none | *All resources * |
| None |
Request syntax
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| IndexId | string | Yes | The knowledge base ID, that is, the | f89ie0xxxx |
| WorkspaceId | string | Yes | The workspace ID to which the knowledge base belongs. For information about how to obtain the workspace ID, see How to use workspaces. | llm-3z7uw7fwz0vexxxx |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| object | Schema of Response | ||
| Code | string | The error status code. | Index.InvalidParameter |
| Message | string | The error message. | Required parameter(%s) missing or invalid, please check the request parameters. |
| RequestId | string | The request ID. | 17204B98-xxxx-4F9A-8464-2446A84821CA |
| Status | string | The status code returned by the operation. | 200 |
| Success | boolean | Indicates whether the call to the operation is successful. Valid values:
| true |
Examples
Success response
JSON format