All Products
Search
Document Center

Data Management:ListKnowledgeBases

Last Updated:May 18, 2026

Returns a paginated list of knowledge bases.

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

Tag

string

Yes

The tag of the knowledge base. In DataAgent, this is the space ID.

1dq7qod8hxtt1***

NamePattern

string

No

A keyword to search for in the names of knowledge bases.

order

NextToken

string

No

The token used to retrieve the next page of results. Valid values:

  • Omit this parameter for the first request.

  • If the previous response returned a NextToken value, use it to retrieve the next page of results.

zCXSmY0CJbybp6FZV7vo0Wjw64X-*****

MaxResults

integer

No

The maximum number of entries to return on each page. Use this parameter with the NextToken parameter to implement pagination.

20

Filters

string

No

The filter conditions for the knowledge bases, specified as a JSON string. The only supported key is state. Valid values are 0 and 1.

{"state":1}

SortFieldName

string

No

The sort field. Valid values:

  • id: Sorts by knowledge base ID. This is the default.

  • name: Sorts by knowledge base name.

Valid values:

  • name :

    name

  • id :

    id

name

SortOrder

string

No

The sort order. Valid values:

  • ASC: Ascending order. This is the default.

  • DESC: Descending order.

Valid values:

  • ASC :

    ASC

  • DESC :

    DESC

Desc

Response elements

Element

Type

Description

Example

object

The response object.

RequestId

string

The request ID.

E0D21075-CD3E-4D98-8264-FD8AD04A63B6

Data

array

A list of knowledge base objects.

OneMetaKnowledgeBase

The details of a knowledge base.

Success

boolean

Indicates whether the request was successful. true indicates success, and false indicates failure.

true

ErrorCode

string

The error code returned if the request fails.

UnknownError

ErrorMessage

string

The error message.

Specified parameter Tag is not valid.

TotalCount

integer

The total number of knowledge bases matching the query. This feature is not currently supported and the returned value is always 0.

0

MaxResults

integer

The number of entries returned on the current page.

20

NextToken

string

The token used to retrieve the next page of results.

  • If this parameter is empty, all results have been returned.

  • If a value is returned, use it in the next request to retrieve the next page of results.

NesLoKLEdIZrKhDT7I2gS****

Examples

Success response

JSON format

{
  "RequestId": "E0D21075-CD3E-4D98-8264-FD8AD04A63B6",
  "Data": [
    {
      "KbUuid": "",
      "Name": "",
      "Description": "",
      "State": 0,
      "Tag": "",
      "Creator": "",
      "GmtCreate": "",
      "GmtModified": "",
      "Domain": "",
      "ExtraInfo": ""
    }
  ],
  "Success": true,
  "ErrorCode": "UnknownError",
  "ErrorMessage": "Specified parameter Tag is not valid.",
  "TotalCount": 0,
  "MaxResults": 20,
  "NextToken": "NesLoKLEdIZrKhDT7I2gS****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.