cURL
Authorizations
string
header
required
DashScope API Key, obtained from the API Key page in the console.
Query Parameters
Response
200-application/json
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
List the documents in a Knowledge Base.
curl -G "https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/indices/rag/index/files" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-d "index_id=your_index_id" \
-d "page_num=1" \
-d "page_size=20"{
"code": "Success",
"status_code": 200,
"data": {
"page_number": 1,
"total_count": 1,
"rows": [
{
"code": "FINISH",
"connectorId": "conn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
"dataSync": false,
"doc_type": "md",
"gmt_modified": 1782184640000,
"message": "Index build succeeded",
"doc_id": "file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
"categoryName": "Default category",
"tags": [],
"ingestion_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"size": 21,
"doc_name": "a",
"canDelete": true,
"source_id": "cate_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
"meta_extract_info": [],
"categoryId": "cate_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
"status": "FINISH"
}
],
"page_size": 1
},
"success": true,
"message": "success",
"request_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "SUCCESS"
}DashScope API Key, obtained from the API Key page in the console.
Response code. Success on success.
HTTP status code.
Unique request identifier. Include this ID when reporting an issue.
Show child attributes
Current page number.
Total Documents.
Document list.
Show child attributes
Unique file identifier.
File name.
File type, for example pdf, docx, txt.
Fine-grained processing status code, e.g. FINISH, PARSE_FAILED, PIPELINE_JOB_RETRY_IMPORT_ERROR.
Coarse-grained processing status, e.g. FINISH, PARSE_FAILED, INSERT_ERROR. Usually matches code; code provides finer error classification.
Processing status description. On failure, the error reason.
File size in bytes.
Last modified time (Unix epoch in milliseconds).
Whether the data is from an incremental sync.
Associated category ID.
Associated category name.
Associated connector ID.
Data source ID.
Ingestion job ID.
Document tag list.
Metadata extraction info.
Whether the document can be deleted.
Whether the request succeeded.
Informational message; success on success.
Request status: SUCCESS or FAILED.
curl -G "https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/indices/rag/index/files" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-d "index_id=your_index_id" \
-d "page_num=1" \
-d "page_size=20"{
"code": "Success",
"status_code": 200,
"data": {
"page_number": 1,
"total_count": 1,
"rows": [
{
"code": "FINISH",
"connectorId": "conn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
"dataSync": false,
"doc_type": "md",
"gmt_modified": 1782184640000,
"message": "Index build succeeded",
"doc_id": "file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
"categoryName": "Default category",
"tags": [],
"ingestion_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"size": 21,
"doc_name": "a",
"canDelete": true,
"source_id": "cate_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
"meta_extract_info": [],
"categoryId": "cate_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
"status": "FINISH"
}
],
"page_size": 1
},
"success": true,
"message": "success",
"request_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "SUCCESS"
}