Skip to main content

List Document Details

Get detailed document information, including chunk count and parsing status.

Prerequisites

Configure the endpoint and authentication first. See API overview and Authentication.

Endpoint

POST /api/v1/indices/rag/list/index/file/details Get detailed information about the documents in a specified knowledge base, including chunk count and parsing status.
This endpoint uses camelCase parameters (such as pageNumber, pageSize), unlike other endpoints that use snake_case.

Request body

FieldRequiredTypeDescription
indexIdYesstringKnowledge base ID.
pageNumberNointegerPage number, starting from 1. Default: 1. Note the camelCase naming.
pageSizeNointegerNumber of documents returned per page. Default: 10. Maximum: 10.

Request example

curl -X POST "$BASE_URL/api/v1/indices/rag/list/index/file/details" \
  -H "Authorization: Bearer $BAILIAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "indexId": "your_index_id",
    "pageNumber": 1,
    "pageSize": 10
  }'
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": [
      {
        "chunkSize": 600,
        "connectorId": "conn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
        "overlapSize": 100,
        "doc_type": "md",
        "gmt_modified": 1782184640000,
        "doc_id": "file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
        "categoryName": "默认类目",
        "separator": " |,|,|。|?|!|\n|\\?|\\!",
        "tags": [],
        "ingestion_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "size": 21,
        "doc_name": "a",
        "chunkMode": "auto",
        "canDelete": true,
        "source_id": "cate_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
        "categoryId": "cate_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
        "status": "FINISH"
      }
    ],
    "page_size": 1
  },
  "success": true,
  "message": "success",
  "request_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "SUCCESS"
}

Response fields

FieldTypeDescription
codestringResponse code. Success on success.
status_codeintegerHTTP status code.
request_idstringUnique request identifier. Provide this ID when troubleshooting.
dataobjectBusiness data. Sub-fields: page_number (integer, current page number), page_size (integer, current page size, consistent with the request), total_count (integer, total number of documents), rows (array<object>, file detail list. Element fields: doc_id (string, unique document identifier), doc_name (string, document name), doc_type (string, document type, such as pdf, docx, or txt), status (string, document processing status: INIT (initializing), PARSING (parsing), PARSE_SUCCESS (parsed successfully), FAIL (failed)), size (integer, document size in bytes), gmt_modified (integer, last modified time as a millisecond Unix timestamp), categoryId (string, ID of the category), categoryName (string, name of the category), connectorId (string, ID of the connector), source_id (string, data source ID), ingestion_id (string, import task ID), tags (array<string>, document tag list), canDelete (boolean, whether the document can be deleted), chunkSize (integer, chunk size), overlapSize (integer, chunk overlap size), separator (string, chunk separator), chunkMode (string, chunk mode), dataSync (boolean, whether the file participates in data sync), meta_extract_info (array, metadata extraction results)).
successbooleanWhether the request succeeded.
messagestringMessage. success on success.
statusstringRequest status: SUCCESS or FAILED.

Error codes

HTTP status codeError codeMessageDescription
400Index.InvalidParameterRequired parameter missing or invalid.Invalid request parameters.
401InvalidApiKeyInvalid API-key provided.Authentication failed. The API key is invalid or missing.
Managed Agent API
Flow Agent API
Sandbox API
RAG API
Long-term Memory
ParseX API
Security API
Framework Integration