Skip to main content

UpdateIndex

Updates the configuration of a specified knowledge base.

Operation description

  • RAM users (sub-accounts) must first obtain the API permissions for Alibaba Cloud Model Studio (AliyunBailianDataFullAccess is required) 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 by using the latest version of the 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 Id is valid).
  • This operation is idempotent.

Debugging

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. Debug

Authorization information

The following table describes the authorization information of the API. You can use the Action element in a RAM permission policy statement to grant a RAM user or RAM 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:
    • Required resource types are marked with a leading asterisk (*).
    • For operations that do not support resource-level authorization, All resources is used.
  • Condition keyword: the condition keywords defined by the cloud product itself.
  • Related operations: the other permissions required to successfully perform the operation. The caller must have the permissions of the related operations at the same time for the operation to succeed.
OperationAccess levelResource typeCondition keywordRelated operations
sfm:UpdateIndexupdate
*All resources
*
    None
None

Request syntax

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

Request parameters

ParameterTypeRequiredDescriptionExample value
WorkspaceIdstringYes

The workspace ID.

llm-3shx2gu255oqxxxx
IdstringYes

The knowledge base ID.

79c0alxxxx
NamestringNo

The name of the knowledge base.

Enterprise help document library
DescriptionstringNo

The description of the knowledge base.

Enterprise knowledge base
RerankMinScorestringNo

The minimum score for sorting. The value must be in the range of [0-1].

0.01
DenseSimilarityTopKintegerNo

Top K for vector retrieval: a vector is generated for the input text, and the K text segments whose vector representations are most similar to it are retrieved from the knowledge base. The value of K must be in the range of [0-100]. The sum of DenseSimilarityTopK and SparseSimilarityTopK must be less than or equal to 200.

The default value is 100.

100
SparseSimilarityTopKintegerNo

Top K for keyword retrieval: text segments in the knowledge base that exactly match the keywords of the input text are retrieved. This helps you filter out irrelevant text segments and provides more accurate results. The value must be in the range of [0-100]. The sum of DenseSimilarityTopK and SparseSimilarityTopK must be less than or equal to 200.

The default value is 100.

100
PipelineCommercialTypestringNo

The edition of the knowledge base. Valid values:

  • standard: Standard Edition

  • enterprise: Ultimate Edition

standard
PipelineCommercialCuintegerNo

The number of RCUs for the Ultimate Edition knowledge base. This parameter is required only when PipelineCommercialType is set to enterprise.

The value must be in the range of [1-200].

3
At least one of the parameters Name, Description, and RerankMinScore must be specified. They cannot be empty at the same time.

Response parameters

NameTypeDescriptionExample value
object

Schema of Response

RequestIdstring

The request ID.

17204B98-7734-4F9A-8464-xxx
Dataobject

The business data returned by the operation.

Idstring

The knowledge base ID.

79c0alxxxx
Statusstring

The status code returned by the operation.

200
Successboolean

Indicates whether the operation call was successful. Valid values:

true: successful

false: failed

true
Messagestring

The error message.

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

The status code.

Success

Examples

Success response JSON format
{
  "RequestId": "17204B98-7734-4F9A-8464-xxx",
  "Data": {
    "Id": "79c0alxxxx"
  },
  "Status": 200,
  "Success": true,
  "Message": "Required parameter(%s) missing or invalid, please check the request parameters.",
  "Code": "Success"
}

Error codes

Visit the Error Center to view more error codes.

Change history

Change timeChange summaryOperation
2026-01-19New OpenAPIView change details