ListDocumentChunks

Updated at:

Queries a list of chunks.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

KbUuid

string

Yes

The ID of the knowledge base.

kb-***

DocumentName

string

No

The name of the document.

test.md

NextToken

string

No

The token used to retrieve the next page of results. Omit this parameter to get the first page. If the response returns a NextToken, it indicates that more results are available. To get the next page, pass this NextToken value in the NextToken parameter of your next request. A null value for NextToken indicates that all results have been retrieved.

zCXSmY0CJbybp6FZV7vo0Wjw64X-*****

MaxResults

integer

No

The maximum number of entries to return on each page.

Valid values: 1 to 100.

Default value: 20.

20

ChunkTitlePattern

string

No

A filter pattern. The operation returns only the chunks whose titles contain this pattern.

test

SortFieldName

string

No

The sort field. Valid values:

  • id (default): The chunk ID.

  • hits: The number of hits.

  • modifyTime: The modification time.

hits

SortOrder

string

No

The sort order. Valid values:

  • ASC (default): ascending order.

  • DESC: descending order.

DESC

Response elements

Element

Type

Description

Example

object

The response object.

RequestId

string

The unique request ID. If you encounter an error, provide this ID for troubleshooting.

67E910F2-4B62-5B0C-ACA3-7547695C****

Data

array

A list of chunks.

OneMetaKnowledgeBaseChunk

The data structure for a single chunk.

Success

boolean

Indicates if the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

ErrorCode

string

The error code returned if the request fails.

KnowledgeBaseNotFound

ErrorMessage

string

The error message returned if the request fails.

Resource not found kb-***

TotalCount

integer

The total number of chunks that meet the filter criteria. (This feature is not yet supported, and the value is always 0.)

0

MaxResults

integer

The number of entries returned on this page.

20

NextToken

string

The pagination token for the next page of results.

zCXSmY0CJbybp6FZV7vo0Wjw64X-*****

Examples

Success response

JSON format

{
  "RequestId": "67E910F2-4B62-5B0C-ACA3-7547695C****",
  "Data": [
    {
      "Id": "",
      "DocName": "",
      "Content": "",
      "ChunkTitle": "",
      "ChunkMtime": ""
    }
  ],
  "Success": true,
  "ErrorCode": "KnowledgeBaseNotFound",
  "ErrorMessage": "Resource not found kb-***",
  "TotalCount": 0,
  "MaxResults": 20,
  "NextToken": "zCXSmY0CJbybp6FZV7vo0Wjw64X-*****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.