ListConnections

Updated at:

Queries 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

Workspace ID. You can call ListWorkspaces to obtain the workspace ID.

478**

NextToken

string

No

The token that marks the starting position for the next page of results.

15

MaxResults

integer

No

Maximum number of entries per page.

10

SortBy

string

No

Field by which to sort results. Default value: GmtCreateTime. Valid values:

  • GmtCreateTime (default): sorts by creation time.

GmtCreateTime

Order

string

No

Sort order. Use with the SortBy parameter. Valid values:

  • ASC: ascending order.

  • DESC (default): descending order.

DESC

ConnectionIds

array

No

List of connection IDs to filter by.

string

No

Connection ID.

conn-ljasd***jsx

ConnectionName

string

No

Connection name. Supports fuzzy matching.

数据库连接

ConnectionTypes

array

No

List of connection types to filter by.

string

No

Connection type. Valid values:

  • DashScopeConnection: Model Studio connection.

  • OpenLLMConnection: open source model connection.

  • MilvusConnection: Milvus connection.

  • OpenSearchConnection: OpenSearch connection.

  • LindormConnection: Lindorm connection.

  • ElasticsearchConnection: Elasticsearch connection.

  • HologresConnection: Hologres connection.

  • RDSConnection: RDS connection.

  • CustomConnection: custom connection.

OpenLLMConnection

EncryptOption

string

No

Encryption option for sensitive fields in the response. Valid values:

  • PlainText: returns values in plaintext.

  • Secret: returns values in ciphertext.

PlainText

Model

string

No

Model identifier. Filters connections associated with this model.

model_001

ModelTypes

array

No

List of model types to filter by.

string

No

Model type. Valid values:

  • LLM

  • Embedding

  • ReRank

LLM

ToolCall

boolean

No

Whether tool calling is supported. Valid values:

  • true: supported.

  • false: not supported.

true

Creator

string

No

Alibaba Cloud account ID of the creator.

12908*******3242

Accessibility

string

No

Visibility of the connection. Valid values:

  • PUBLIC: visible to all workspace members.

  • PRIVATE: visible only to the creator.

PRIVATE

Response elements

Element

Type

Description

Example

object

Response body.

Connections

array

List of connections.

Connection

Connection object.

MaxResults

integer

Maximum number of entries per page.

10

NextToken

string

Token for retrieving the next page of results.

15

TotalCount

integer

Total number of connections that match the query conditions.

27

RequestId

string

Request ID. Used for troubleshooting.

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.