Skip to content

ListIndexFileDetails

Retrieves the details of one or more documents in a specified knowledge base.

Operation description

  • A RAM user must have the API permissions for Alibaba Cloud Model Studio to call this operation. The AliyunBailianDataFullAccess permission, which includes the `sfm:ListIndexFiles` permission, is required. An Alibaba Cloud account can call this operation without authorization. You can call this operation using the latest version of the Alibaba Cloud Model Studio SDK.

  • Before you call this operation, ensure that your knowledge base exists and its ID, IndexId, is valid.

  • This operation is idempotent.

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.

ActionAccess levelResource typeCondition keyDependent action
sfm:ListIndexFileslist*All Resource *NoneNone

Request syntax

HELPCODEESCAPE-plaintext
POST /{WorkspaceId}/index/list_index_file_detail HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
IndexIdstringNoThe ID of the knowledge base. This is the value of the Data.Id parameter returned by the CreateIndex operation.79c0alxxxx
DocumentStatusstringNoThe import status of the documents to return. Valid values: - INSERT_ERROR: The document failed to be imported. - RUNNING: The document is being imported. - DELETED: The document has been deleted. - FINISH: The document was imported successfully. If you do not specify this parameter, the results are not filtered by import status.FINISH
DocumentNamestringNoThe name of the documents to return. If you do not specify this parameter, the results are not filtered by name.doc
PageNumberintegerNoThe number of the page to return. The value starts from 1. Default value: 1.1
PageSizeintegerNoThe number of documents to return on each page. Maximum value: 10.10
WorkspaceIdstringYesThe ID of the workspace to which the knowledge base belongs. For more information, see Workspaces.llm-3z7uw7fwz0vexxxx
EnableNameLikestringNoSpecifies whether to perform a fuzzy search based on the document name. This parameter is used with the DocumentName parameter. Valid values: - true: Performs a fuzzy search based on the document name. - false: Performs an exact match based on the document name. Default value: false.false

Response elements

ParameterTypeDescriptionExample
objectResponse schema
RequestIdstringThe ID of the request.35A267BF-xxxx-54DB-8394-AA3B0742D833
CodestringThe error code.InvalidParameter
MessagestringThe error message.Required parameter(%s) missing or invalid, please check the request parameters.
SuccessbooleanIndicates whether the request was successful. Valid values: - true: The request was successful. - false: The request failed.true
DataobjectThe returned data.
DocumentsarrayA list of documents in the knowledge base. The documents are sorted by import time in descending order. This order is the same as the order in the console.
objectThe document object.
StatusstringThe import status of the document. Valid values: - INSERT_ERROR: The document failed to be imported. - RUNNING: The document is being imported. - DELETED: The document has been deleted. - FINISH: The document was imported successfully.RUNNING
EnableHeadersstringIndicates whether the table headers of Excel files in an unstructured knowledge base are concatenated.true
OverlapSizestringThe overlap length of chunks.100
MessagestringThe error message that is returned if the document fails to be imported.check fileUrlKey[file_path] / fileNameKey[null] / fileExtensionKey[file_extension] is invalid
SizeintegerThe size of the document, in bytes.996764
SourceIdstringThe category ID.cate_21a407a3372c4ba7aedc649709143f0cxxxxxxxx
GmtModifiedintegerThe time when the document was imported. This value is a Unix timestamp.1744856423000
DocumentTypestringThe format of the document. Valid values: pdf, docx, doc, txt, md, pptx, ppt, png, jpg, jpeg, bmp, gif, and EXCEL.pdf
ChunkModestringThe custom chunking method.DashSplitter
CodestringThe error code that is returned if the document fails to be imported.110002
separatorstringThe sentence separator." "
NamestringThe name of the document.doc
ChunkSizestringThe length of a chunk, in characters.600
IdstringThe document ID.doc_c134aa2073204a5d936d870bf960f56axxxxxxxx
IndexIdstringThe knowledge base ID.79c0alxxxx
TotalCountintegerThe total number of entries.2437
PageNumberintegerThe returned page number.1
PageSizeintegerThe number of entries returned on each page.10
StatusstringThe HTTP status code.200

Examples

Success response

JSON format

HELPCODEESCAPE-json
{
  "RequestId": "35A267BF-xxxx-54DB-8394-AA3B0742D833",
  "Code": "InvalidParameter\n",
  "Message": "Required parameter(%s) missing or invalid, please check the request parameters.",
  "Success": true,
  "Data": {
    "Documents": [
      {
        "Status": "RUNNING",
        "EnableHeaders": "true",
        "OverlapSize": "100",
        "Message": "check fileUrlKey[file_path] / fileNameKey[null] / fileExtensionKey[file_extension] is invalid",
        "Size": 996764,
        "SourceId": "cate_21a407a3372c4ba7aedc649709143f0cxxxxxxxx\n",
        "GmtModified": 1744856423000,
        "DocumentType": "pdf",
        "ChunkMode": "DashSplitter",
        "Code": "110002",
        "separator": "\" \"",
        "Name": "doc\n",
        "ChunkSize": "600",
        "Id": "doc_c134aa2073204a5d936d870bf960f56axxxxxxxx\n"
      }
    ],
    "IndexId": "79c0alxxxx",
    "TotalCount": 2437,
    "PageNumber": 1,
    "PageSize": 10
  },
  "Status": "200"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.

Mirror of Alibaba Cloud Model Studio docs for reference and RAG. Not affiliated with Alibaba Cloud.