All Products
Search
Document Center

AnalyticDB:ListDocumentCollections

Last Updated:Feb 04, 2026

Lists document collections.

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

gpdb:ListDocumentCollections

create

*Collection

acs:gpdb:{#regionId}:{#accountId}:collection/{#DBInstanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

DBInstanceId

string

Yes

The ID of the instance.

Note

To view details of all AnalyticDB for PostgreSQL instances in a region, including their IDs, call the DescribeDBInstances operation.

gp-xxxxxxxxx

Namespace

string

No

The namespace. Default value: public.

Note

To create a namespace, call the CreateNamespace operation. To list namespaces, call the ListNamespaces operation.

mynamespace

NamespacePassword

string

Yes

The password for the namespace.

Note

You set this password when you call the CreateNamespace operation.

testpassword

RegionId

string

Yes

The ID of the region where the instance resides.

cn-hangzhou

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

ABB39CC3-4488-4857-905D-2E4A051D0521

Status

string

The creation status. Valid values:

  • success: The operation succeeded.

  • fail: The operation failed.

success

Message

string

The response message.

success

Count

integer

The total number of items.

10

Items

object

CollectionList

array<object>

The list of document collections.

object

Information about a document collection.

CollectionName

string

The name of the document collection.

document

EmbeddingModel

string

The embedding algorithm.

text-embeddding-v1

Dimension

integer

The vector dimensions.

1536

FullTextRetrievalFields

string

The fields used for full-text search. Separate multiple fields with commas (,).

title

Metadata

string

The metadata.

{'page': 'int', 'title': 'text'}

Parser

string

The tokenizer used for full-text search.

zh_cn

Metrics

string

The vector similarity algorithm.

cosine

SupportSparse

boolean

Indicates whether sparse vectors are supported. Default value: false.

true

SparseRetrievalFields

string

The metadata fields used to build sparse vectors. Separate multiple fields with commas (,).

title,abstract

Examples

Success response

JSON format

{
  "RequestId": "ABB39CC3-4488-4857-905D-2E4A051D0521",
  "Status": "success",
  "Message": "success",
  "Count": 10,
  "Items": {
    "CollectionList": [
      {
        "CollectionName": "document",
        "EmbeddingModel": "text-embeddding-v1",
        "Dimension": 1536,
        "FullTextRetrievalFields": "title",
        "Metadata": "{'page': 'int', 'title': 'text'}",
        "Parser": "zh_cn",
        "Metrics": "cosine",
        "SupportSparse": true,
        "SparseRetrievalFields": "title,abstract"
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.