All Products
Search
Document Center

Alibaba Cloud Model Studio:ListIndices

Last Updated:Jun 12, 2026

Retrieves the list of knowledge bases in a specified workspace.

Operation description

  • Resource Access Management (RAM) users must first obtain API permissions for Alibaba Cloud Model Studio (requires AliyunBailianDataFullAccess, which includes the sfm:ListIndex permission) before calling this operation. Alibaba Cloud accounts can call this operation directly without authorization. Use the latest Alibaba Cloud Model Studio SDK to call this operation.

  • This operation is idempotent.

Rate limit: This operation is throttled if called too frequently. Do not exceed 10 calls per second. If throttled, retry later.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

sfm:ListIndex

list

*All Resource

*

None None

Request syntax

GET /{WorkspaceId}/index/list_indices HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

WorkspaceId

string

Yes

The ID of the workspace to which the knowledge base belongs. For more information, see How to use a workspace.

llm-3shx2gu255oq6xxxx

Request parameters

Parameter

Type

Required

Description

Example

IndexName

string

No

The name of the knowledge base. You can use this parameter to search for a knowledge base by name. The name must be 1 to 20 characters in length and can contain characters classified as letters in Unicode (including English letters, Chinese characters, and digits). The name can also contain colons (:), underscores (_), periods (.), or hyphens (-).

Default value: empty, which queries all knowledge bases in the specified workspace.

idx_status_score

PageNumber

string

No

The page number. Minimum value: 1. Default value: 1.

1

PageSize

string

No

The number of knowledge bases to display per page in a paging query. No maximum limit. Default value: 10.

10

Response elements

Element

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 page number returned.

1

PageSize

integer

The number of entries per page returned.

10

TotalCount

integer

The total number of entries returned.

48

Indices

array<object>

The list of knowledge bases.

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.

lecxr5xxxx

Name

string

The name of the knowledge base.

XXXX产品清单

Description

string

The description of the knowledge base.

清单中产品主要面向海外客户。

StructureType

string

The vector storage type of the knowledge base. Valid values:

  • UNSTRUCTURED

UNSTRUCTURED

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

text-embedding-v2

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.

string

The primary key ID of the document.

file_8c67b438043848199ffaa903d29addd4_xxxxxxxx

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.

BUILT_IN

SinkInstanceId

string

The ID of the vector storage instance.

gp-bp1gq62t1788yxxxx

SinkRegion

string

The region of the vector storage instance.

cn-hangzhou

ConfgModel

string

The configuration pattern used by this knowledge base. Valid values:

  • recommend: Recommended configuration.

  • user-defined: Custom.

recommend

EnableRewrite

boolean

Indicates whether multi-turn conversation rewriting is Enabled for this knowledge base. Valid values:

  • true: Enabled.

  • false: Not enabled.

false

Code

string

The error code.

Index.InvalidParameter

Message

string

The error message.

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

Success

boolean

Indicates whether the operation was successful. Valid values:

  • true: Successful.

  • false: Failed.

true

Status

string

The status code returned by the operation.

200

Examples

Success response

JSON format

{
  "RequestId": "17204B98-xxxx-4F9A-8464-2446A84821CA",
  "Data": {
    "PageNumber": 1,
    "PageSize": 10,
    "TotalCount": 48,
    "Indices": [
      {
        "Id": "lecxr5xxxx",
        "Name": "XXXX产品清单",
        "Description": "清单中产品主要面向海外客户。",
        "StructureType": "UNSTRUCTURED",
        "ChunkSize": 5,
        "OverlapSize": 10,
        "Separator": "\\n",
        "EmbeddingModelName": "text-embedding-v2",
        "RerankModelName": "gte-rerank-hybrid",
        "RerankMinScore": "0.01",
        "SourceType": "DATA_CENTER_FILE",
        "DocumentIds": [
          "file_8c67b438043848199ffaa903d29addd4_xxxxxxxx"
        ],
        "SinkType": "BUILT_IN",
        "SinkInstanceId": "gp-bp1gq62t1788yxxxx",
        "SinkRegion": "cn-hangzhou",
        "ConfgModel": "recommend",
        "EnableRewrite": false
      }
    ]
  },
  "Code": "Index.InvalidParameter",
  "Message": "Required parameter(%s) missing or invalid, please check the request parameters.",
  "Success": true,
  "Status": "200"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.