All Products
Search
Document Center

Platform For AI:ListConnections

Last Updated:Oct 17, 2025

Retrieves a list of connections.

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

paiworkspace:ListConnections

list

*All Resource

*

None None

Request syntax

GET /api/v1/connections HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

WorkspaceId

string

No

The workspace ID. For more information about how to obtain a workspace ID, see ListWorkspaces.

478**

NextToken

string

No

The pagination token. It is used to mark the starting position for the next paged query.

15

MaxResults

integer

No

The maximum number of entries to return on each page.

10

SortBy

string

No

The field to sort by for a paged query. The default value is GmtCreateTime. Valid values:

  • GmtCreateTime (default): Sorts by creation time.

GmtCreateTime

Order

string

No

The sort order for the paged query. Use this parameter with SortBy.

  • ASC: Ascending order.

  • DESC (default): Descending order.

DESC

ConnectionIds

array

No

A list of connection IDs.

string

No

The connection ID.

conn-ljasd***jsx

ConnectionName

string

No

The name of the connection.

数据库连接

ConnectionTypes

array

No

A list of connection types.

string

No

The connection type. Valid values:

  • DashScopeConnection: A Model Studio service connection.

  • OpenLLMConnection: An open source model connection.

  • MilvusConnection: A Milvus connection.

  • OpenSearchConnection: An OpenSearch connection.

  • LindormConnection: A Lindorm connection.

  • ElasticsearchConnection: An Elasticsearch connection.

  • HologresConnection: A Hologres connection.

  • RDSConnection: An RDS connection.

  • CustomConnection: A custom connection.

OpenLLMConnection

EncryptOption

string

No

The encryption setting. Valid values:

  • PlainText

  • Secret

PlainText

Model

string

No

The model identifier.

model_001

ModelTypes

array

No

A list of model types.

string

No

The model type. Valid values:

  • LLM

  • Embedding

  • ReRank

LLM

ToolCall

boolean

No

Indicates whether tool calling is supported. Valid values:

  • true: Supported.

  • false: Not supported.

true

Creator

string

No

The creator.

12908*******3242

Response elements

Element

Type

Description

Example

object

The response.

Connections

array

The list of connections.

Connection

The connection information.

MaxResults

integer

The maximum number of entries returned on each page.

10

NextToken

string

The pagination token. It is used to mark the starting position for the next paged query.

15

TotalCount

integer

The total number of connections that meet the filter conditions.

27

RequestId

string

The unique ID of the request.

B2C51F93-1C07-5477-9705-5FDB****F19F

Examples

Success response

JSON format

{
  "Connections": [
    {
      "Description": "This is a description of a database connection.",
      "ConnectionType": "ElasticsearchConnection",
      "Accessibility": "PRIVATE",
      "Secrets": {
        "key": "Dsjk***hsl01\n"
      },
      "WorkspaceId": "228**",
      "Creator": "20925961****557803",
      "ResourceMeta": {
        "InstanceName": "lindorm-xxxxxxx",
        "Extra": "{\"vpcId\":\"vpc-xxxx\"}",
        "InstanceId": "ld-2vc1***v1zaqgzol"
      },
      "GmtModifiedTime": "2025-03-07T07:54:56Z\n",
      "ConnectionName": "lindorm-connection",
      "ConnectionId": "conn-pai9m***mi47",
      "Configs": {
        "key": "12345"
      },
      "Models": [
        {
          "ToolCall": true,
          "Model": "model_001",
          "DisplayName": "BGE model deploy.",
          "ModelType": "LLM"
        }
      ],
      "GmtCreateTime": "2025-03-07T07:54:56Z\n"
    }
  ],
  "MaxResults": 10,
  "NextToken": "15",
  "TotalCount": 27,
  "RequestId": "B2C51F93-1C07-5477-9705-5FDB****F19F"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.