Appearance
ListIndices
Lists the details about the next or multiple knowledge bases in a specified workspace.
Operation description
This interface is idempotent.
Debugging
You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples. Debug
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| sfm:ListIndex | list | * All Resources * | none | none |
Request syntax
GET /{WorkspaceId}/index/list_indices HTTP/1.1Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| IndexName | string | No | The name of the knowledge base. You can query knowledge base by name. The name must be 1 to 20 characters in length and can contain characters classified as letter in Unicode, including English letters, Chinese characters, digits, among others. The name can also contain colons (😃, underscores (_), periods (.), and hyphens (-). This parameter is left empty by default, which means that all knowledge bases in the specified workspace are queried. | idx_status_score |
| PageNumber | string | No | The number of the pages to return. Pages start from page 1. Default value: 1. | 1 |
| PageSize | string | No | The number of knowledge bases to display on each page. No maximum value. Default value: 10. | 10 |
| WorkspaceId | string | Yes | The ID of the workspace to which the knowledge base belongs. To view the workspace ID, you can click the Workspace Details icon in the upper-left corner on the homepage of the console. | ws_3Nt27MYcoK191ISp |
Response parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| object | Schema of Response | ||
| RequestId | string | The request ID. | 17204B98-xxxx-4F9A-8464-2446A84821CA |
| Data | object | The returned data. | |
| PageNumber | integer | The specified page number. | 1 |
| PageSize | integer | The specified number of documents on each page. | 10 |
| TotalCount | integer | The total number of knowledge bases returned. | 48 |
| Indices | array | The list of knowledge bases. | |
| rows | object | The knowledge base object. | |
| Id | string | The primary key ID of the knowledge base, which is the Data.Id parameter returned by the CreateIndex operation. | 259899 |
| Name | string | The name of the knowledge base. | temp_mUB4j |
| Description | string | The description of the knowledge base. | If each RAM user belongs to a RAM group, the configuration is considered compliant. |
| StructureType | string | The vector storage type of the knowledge base. Valid values: - UNSTRUCTURED | structured |
| ChunkSize | integer | The estimated length of chunks. Valid values: [1-2048]. | 5 |
| OverlapSize | integer | The overlap length. Valid values: [0-1024]. | 10 |
| Separator | string | The clause identifier. Separate multiple clause identifiers with |. Valid values: - \n: line break - ,: Chinese comma - ,: English comma - 。 : Chinese full stop - .: English full stop - ! : Chinese exclamation point - ! : English exclamation point - ;: Chinese semicolon - ;: English semicolon - ? : Chinese question mark - ?: English question mark | \n |
| EmbeddingModelName | string | The name of the embedding model. Valid values: - text-embedding-v2 | conv-rewrite-qwen-1.8b |
| RerankModelName | string | The name of the rank model. Valid values: - gte-rerank-hybrid - gte-rerank | gte-rerank-hybrid |
| RerankMinScore | string | Similarity Threshold Valid values: [0.01-1.00]. | 0.01 |
| SourceType | string | The data type of Data Management. For unstructured knowledge base, possible values: - DATA_CENTER_CATEGORY: The category type. - DATA_CENTER_FILE: The document type. For structured knowledge base, possible values: - DATA_CENTER_STRUCTURED_TABLE: The data table type. | DATA_CENTER_FILE |
| DocumentIds | array | The list of the primary key IDs of the documents. | |
| docIds | string | The primary key ID of the document. | file_8c67b438043848199ffaa903d29addd4_10151493 |
| SinkType | string | The vector storage type of the knowledge base. Valid values: - ES: Built-in vector database. - BUILT_IN: Built-in vector database. - ADB: AnalyticDB for PostgreSQL database. | es |
| SinkInstanceId | string | The ID of the vector storage instance. | gp-bp1gq62t1788yw2ol |
| SinkRegion | string | The region of the vector storage instance. | cn-hangzhou |
| Code | string | HTTP status code | Index.InvalidParameter |
| Message | string | The error message. | Required parameter(%s) missing or invalid, please check the request parameters. |
| Success | boolean | Indications whether the API call is successful. Valid values: - true - false | true |
| Status | string | The HTTP status code returned. | 200 |
Examples
Sample success responses
JSONformat
{
"RequestId": "17204B98-xxxx-4F9A-8464-2446A84821CA",
"Data": {
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 48,
"Indices": [
{
"Id": 259899,
"Name": "temp_mUB4j",
"Description": "If each RAM user belongs to a RAM group, the configuration is considered compliant.",
"StructureType": "structured",
"ChunkSize": 5,
"OverlapSize": 10,
"Separator": "\\n",
"EmbeddingModelName": "conv-rewrite-qwen-1.8b",
"RerankModelName": "gte-rerank-hybrid",
"RerankMinScore": 0.01,
"SourceType": "DATA_CENTER_FILE",
"DocumentIds": [
"file_8c67b438043848199ffaa903d29addd4_10151493"
],
"SinkType": "es",
"SinkInstanceId": "gp-bp1gq62t1788yw2ol",
"SinkRegion": "cn-hangzhou"
}
]
},
"Code": "Index.InvalidParameter",
"Message": "Required parameter(%s) missing or invalid, please check the request parameters.",
"Success": true,
"Status": 200
}Error codes
For a list of error codes, visit the Service error codes.