Skip to main content

List Knowledge Bases

Paginate through every Knowledge Base in the current workspace, returning basic information plus embedding and rerank model configurations.

Prerequisites

Get an API key and a workspace ID, and configure authentication first. See API overview and Authentication.

Endpoint

GET /api/v1/indices/rag/index/list Paginate through every Knowledge Base in the current workspace, returning basic information plus embedding and rerank model configurations. Pagination and filter parameters are passed through the query string.

Request parameters

The following parameters are passed through the query string.
ParameterRequiredTypeDescription
page_numberNointegerPage number, starting from 1. Default: 1.
page_sizeNointegerNumber of Knowledge Bases per page. Valid range: 1-100. Default: 10.
pipeline_nameNostringFuzzy filter by Knowledge Base name; returns Knowledge Bases whose names contain this value. When omitted, all Knowledge Bases in the workspace are returned. 1-20 characters; supports Unicode letter category characters (including English letters, Chinese characters, digits, etc.), and may contain half-width colons (:), underscores (_), half-width periods (.), or hyphens (-).

Request example

curl -G "$BASE_URL/api/v1/indices/rag/index/list" \
  -H "Authorization: Bearer $BAILIAN_API_KEY" \
  -d "page_number=1" \
  -d "page_size=20"
BASE_URL is https://{workspace_id}.cn-beijing.maas.aliyuncs.com ({workspace_id} is the workspace ID), and BAILIAN_API_KEY is your Alibaba Cloud Model Studio API key.

Response example

Returns 200 on success.
{
  "code": "Success",
  "status_code": 200,
  "data": {
    "page_number": 1,
    "total_count": 1,
    "rows": [
      {
        "id": "your-kb-id",
        "name": "my-knowledge-base",
        "description": "your-kb-description",
        "dataType": "unstructured",
        "structureType": "unstructured",
        "knowledgeType": null,
        "embeddingModelName": "text-embedding-v4",
        "embeddingDimension": null,
        "multimodalEmbeddingModelName": null,
        "rerankModelName": "qwen3-rerank",
        "rerankMinScore": 0.2,
        "rerankTopN": null,
        "rerankMode": null,
        "rerankInstruct": null,
        "chunkSize": 600,
        "overlapSize": 100,
        "separator": null,
        "chunkMode": null,
        "sourceType": "DATA_CENTER_CATEGORY",
        "docIds": [
          "cate_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
          "cate_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx"
        ],
        "columns": null,
        "enableRewrite": true,
        "connectorId": null,
        "sparseSimilarityTopK": null,
        "denseSimilarityTopK": null
      }
    ],
    "page_size": 20
  },
  "success": true,
  "message": "success",
  "request_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "SUCCESS"
}

Response fields

FieldTypeDescription
codestringResponse code. Success when successful.
status_codeintegerHTTP status code.
request_idstringUnique request identifier. Provide this ID when troubleshooting.
successbooleanWhether the request succeeded.
messagestringResponse message. success when successful.
statusstringRequest status: SUCCESS or FAILED.
dataobjectPaged result. Sub-fields: page_number (integer, current page number), total_count (integer, total number of Knowledge Bases), page_size (integer, current page size, same as the request), rows (array, Knowledge Base list; see the table below for element fields).

rows element fields

FieldTypeDescription
idstringUnique Knowledge Base identifier.
namestringKnowledge Base name.
descriptionstringKnowledge Base description.
dataTypestringData type, for example unstructured.
structureTypestringStructure type: unstructured or structured.
knowledgeTypestringKnowledge Base type.
embeddingModelNamestringEmbedding model, for example text-embedding-v4.
embeddingDimensionintegerEmbedding dimension.
multimodalEmbeddingModelNamestringMultimodal embedding model name (image/audio-video Knowledge Bases).
chunkSizeintegerChunk size in characters.
overlapSizeintegerChunk overlap size in characters.
separatorstringChunk separator.
chunkModestringChunk mode.
rerankModelNamestringRerank model, for example qwen3-rerank. Empty means rerank is not enabled.
rerankMinScorenumberMinimum rerank score threshold.
rerankTopNintegerNumber of results returned by rerank.
rerankModestringRerank mode.
rerankInstructstringCustom rerank instruction.
sourceTypestringData source type, for example DATA_CENTER_CATEGORY.
docIdsarray<string>Associated category/document ID list.
columnsarray<object>Column information, returned for structured Knowledge Bases. Sub-field: IsSearch (boolean, whether the column participates in Knowledge Base retrieval; true allows searching the data in this column).
structuredIndexConfigobjectIndex configuration of Data Query or Image Q&A Knowledge Bases.
connectorIdstringAssociated connector ID.
enableRewritebooleanWhether query rewrite is enabled.
sparseSimilarityTopKintegerSparse retrieval TopK.
denseSimilarityTopKintegerDense retrieval TopK.
knowledgeScenestringKnowledge Base scenario.
workspaceIdstringID of the workspace the Knowledge Base belongs to.
enableHeadersbooleanWhether chunks retain heading hierarchy information.
enableVisualTextbooleanWhether visual text parsing is enabled.
chunkOverlapintegerChunk overlap length.
categoryIdsarrayAssociated category ID list.
tableIdsarrayTable ID list associated with a structured Knowledge Base.
dataSourceobjectData source configuration.
sinkTypestringVector storage type. Default: DEFAULT.
sinkInstanceIdstringID of a self-managed vector storage instance. Empty when the default storage is used.
sinkRegionstringRegion of the vector storage.
metaExtractColumnsarrayMetadata extraction column configuration.
pipelineTagstringKnowledge Base tag.
createIndexTypestringHow the Knowledge Base was created.
dataSyncbooleanWhether data sync is enabled.
datasourceCodestringData source code, used by structured Knowledge Bases.
tablestringAssociated data table name, used by structured Knowledge Bases.
databasestringAssociated database name, used by structured Knowledge Bases.
channelTypestringChannel type.

Error codes

HTTP status codeError code (code)Description
400Index.InvalidParameterInvalid request parameters: Required parameter missing or invalid.
401InvalidApiKeyInvalid or missing API key: Invalid API-key provided.
Managed Agent API
Flow Agent API
Sandbox API
RAG API
Long-term Memory
ParseX API
Security API
Framework Integration