Skip to main content

DeleteIndex

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.
Rate limit: This operation is throttled if called too frequently. Do not exceed 10 calls per second. If you are throttled, retry later.

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 resources is 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.
ActionAccess levelResource typeCondition keyDependent action
sfm:DeleteIndexnone
*All resources
*
    None
None

Request syntax

POST /{WorkspaceId}/index/delete HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample value
IndexIdstringYes

The knowledge base ID, that is, the Data.Id returned by the CreateIndex operation.

f89ie0xxxx
WorkspaceIdstringYes

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

NameTypeDescriptionExample value
object

Schema of Response

Codestring

The error status code.

Index.InvalidParameter
Messagestring

The error message.

Required parameter(%s) missing or invalid, please check the request parameters.
RequestIdstring

The request ID.

17204B98-xxxx-4F9A-8464-2446A84821CA
Statusstring

The status code returned by the operation.

200
Successboolean

Indicates whether the call to the operation is successful. Valid values:

  • true: successful
  • false: failed
true

Examples

Success response JSON format
{
  "Code": "Index.InvalidParameter",
  "Message": "Required parameter(%s) missing or invalid, please check the request parameters.",
  "RequestId": "17204B98-xxxx-4F9A-8464-2446A84821CA",
  "Status": 200,
  "Success": true
}

Error codes

Visit the Error Center to view more error codes.