GetConnection
Retrieves the details of a connection.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
paiworkspace:GetConnection |
get |
*All Resource
|
None | None |
Request syntax
GET /api/v1/connections/{ConnectionId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ConnectionId |
string |
Yes |
The connection ID. For more information about how to obtain a connection ID, see ListConnections. |
conn-pai9m***mi47 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| EncryptOption |
string |
No |
The encryption setting. Valid values:
|
PlainText |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| RequestId |
string |
The unique ID of the request. |
5A14FA81-DD4E-******-6343FE44B941 |
| WorkspaceId |
string |
The workspace ID. |
11**43 |
| Accessibility |
string |
The visibility of the resource. Valid values:
|
PRIVATE |
| ConnectionId |
string |
The connection ID. |
conn-pai9m***mi47 |
| ConnectionType |
string |
The type of the connection. Valid values:
|
OpenSearchConnection |
| ConnectionName |
string |
The name of the connection. |
数据库连接 |
| Description |
string |
The description of the connection. |
用于数据集检索。 |
| Configs |
object |
The configuration information of the connection. |
|
|
string |
The value of a connection configuration. |
12345 |
|
| Secrets |
object |
The key-value pairs that need to be encrypted. Examples include the logon password for a database and the key for a model connection. |
|
|
string |
The value of an encrypted connection configuration. |
Dsjk***hsl01 |
|
| GmtCreateTime |
string |
The UTC time when the connection was created. The time is in the ISO 8601 format. |
2025-03-07T07:54:56Z |
| GmtModifiedTime |
string |
The UTC time when the connection was last modified. The time is in the ISO 8601 format. |
2025-03-07T07:54:56Z |
| Creator |
string |
The creator of the connection. |
28632***898231 |
| ResourceMeta |
object |
The instance resource information of the connection. This parameter is typically used for database connections. |
|
| InstanceId |
string |
The instance ID. |
ld-2vc1***v1zaqgzol |
| InstanceName |
string |
The instance name. |
测试实例。 |
| Extra |
string |
Additional configuration information. |
{"vpcId":"vpc-xxxx"} |
| Models |
array<object> |
The list of models. This parameter is applicable to connections of the model service type. |
|
|
object |
The model information. |
||
| Model |
string |
The model identifier. |
model_001 |
| DisplayName |
string |
The display name of the model. |
测试语言模型。 |
| ModelType |
string |
The model type. Valid values:
|
LLM |
| ToolCall |
boolean |
Indicates whether tool calling is supported. Valid values:
|
true |
Examples
Success response
JSON format
{
"RequestId": "5A14FA81-DD4E-******-6343FE44B941",
"WorkspaceId": "11**43",
"Accessibility": "PRIVATE",
"ConnectionId": "conn-pai9m***mi47",
"ConnectionType": "OpenSearchConnection",
"ConnectionName": "数据库连接",
"Description": "用于数据集检索。",
"Configs": {
"key": "12345"
},
"Secrets": {
"key": "Dsjk***hsl01"
},
"GmtCreateTime": "2025-03-07T07:54:56Z",
"GmtModifiedTime": "2025-03-07T07:54:56Z",
"Creator": "28632***898231",
"ResourceMeta": {
"InstanceId": "ld-2vc1***v1zaqgzol",
"InstanceName": "测试实例。",
"Extra": "{\"vpcId\":\"vpc-xxxx\"}"
},
"Models": [
{
"Model": "model_001",
"DisplayName": "测试语言模型。",
"ModelType": "LLM",
"ToolCall": true
}
]
}
Error codes
See for a complete list.
Release notes
See Release Notes for a complete list.