cURL
Authorizations
string
header
required
DashScope API Key,在控制台 API Key 页面(https://agent.console.aliyun.com/settings/apikey)获取。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
查询指定知识库中的文档列表
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_number=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": "索引构建成功",
"doc_id": "file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
"categoryName": "默认类目",
"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,在控制台 API Key 页面(https://agent.console.aliyun.com/settings/apikey)获取。
响应码,成功时为 Success。
HTTP 状态码。
请求唯一标识,排查问题时请提供此 ID。
Show child attributes
当前页码。
文档总数。
文档列表。
Show child attributes
文档唯一标识。
文档名称。
文档类型,如 pdf、docx、txt。
细粒度处理状态码,如 FINISH、PARSE_FAILED、PIPELINE_JOB_RETRY_IMPORT_ERROR 等。
粗粒度处理状态,如 FINISH、PARSE_FAILED、INSERT_ERROR 等。与 code 多数情况下一致,code 提供更细的错误归类。
处理状态描述,失败时为错误原因。
文件大小(字节)。
最后修改时间(毫秒级 Unix 时间戳)。
是否为增量同步数据。
所属类目 ID。
所属类目名称。
所属连接器 ID。
数据源 ID。
导入任务 ID。
文档标签列表。
元数据抽取信息。
是否可删除。
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_number=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": "索引构建成功",
"doc_id": "file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
"categoryName": "默认类目",
"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"
}