All Products
Search
Document Center

PolarDB:DescribeKnowledgeBases

Last Updated:Aug 28, 2026

Queries the 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

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.

Action

Access level

Resource type

Condition key

Dependent action

polardb:DescribeKnowledgeBases

get

*All Resource

*

None None

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID.

cn-beijing

KnowledgeSpaceId

string

No

The unique identifier of the knowledge space.

pks-xxxxxx

PageNumber

integer

No

The page number.

1

PageSize

integer

No

The number of entries per page.

30

Keyword

string

No

The keyword for searching knowledge bases.

testkb

Status

string

No

The status of the knowledge base.

Activation

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

Id of the request

CDB3258F-B5DE-43C4-8935-CBA0CA******

PageNumber

integer

The page number.

1

PageSize

integer

The number of entries per page. Valid values: 30, 50, and 100.

Default value: 30.

30

TotalRecordCount

integer

The total number of records.

1

Items

array<object>

The list of knowledge bases.

object

KnowledgeBaseId

string

The unique identifier of the knowledge base.

pkb-xxxxxx

Name

string

The name of the knowledge base.

testName

Description

string

The description of the knowledge base.

testDesc

KnowledgeSpaceId

string

The ID of the knowledge space.

pks-xxxxxx

KnowledgeBaseType

string

The type of the knowledge base. Valid values:

  • PUBLIC: public.

  • PERSONAL: personal.

PUBLIC

TotalDocs

integer

The total number of documents.

1

TotalSizeBytes

integer

The total size in bytes.

231984

Status

string

The status of the knowledge base.

Activation

CreationTime

string

The creation time.

2025-03-25T09:37:10Z

BindingAppCount

integer

The number of AI applications bound to the knowledge base.

2

Examples

Success response

JSON format

{
  "RequestId": "CDB3258F-B5DE-43C4-8935-CBA0CA******",
  "PageNumber": 1,
  "PageSize": 30,
  "TotalRecordCount": 1,
  "Items": [
    {
      "KnowledgeBaseId": "pkb-xxxxxx",
      "Name": "testName",
      "Description": "testDesc",
      "KnowledgeSpaceId": "pks-xxxxxx",
      "KnowledgeBaseType": "PUBLIC",
      "TotalDocs": 1,
      "TotalSizeBytes": 231984,
      "Status": "Activation",
      "CreationTime": "2025-03-25T09:37:10Z",
      "BindingAppCount": 2
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.