Get connector details¶
Read a saved connector by connector ID. Use this endpoint to confirm its current name, status, purpose, and related tasks; read details before updating or deleting it.
POST https://moi.matrixorigin.cn/newmoi/connectors/get
Before you call¶
Prepare a personal access token that can access the target workspace, the target workspace ID, and a connector ID returned by the list or create endpoint.
The example uses:
$AI_STUDIO_API_KEY: your personal access token, sent in theX-API-Keyheader.$WORKSPACE_ID: the target workspace ID, sent in theX-Workspace-IDheader.$CONNECTOR_ID: the connector ID to query.
Request example¶
curl -X POST "https://moi.matrixorigin.cn/newmoi/connectors/get" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{"id":"'"$CONNECTOR_ID"'"}'
Request body¶
The request body needs only the connector ID.
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Connector ID. |
[] after a type denotes an array. [] in a field path denotes each item in an array.
Successful response¶
A successful request returns 200. To protect credentials, sensitive fields in the configuration can be omitted; an omitted field does not mean that the saved credential has been cleared.
{
"code": "OK",
"msg": "OK",
"data": {
"id": "conn_01",
"name": "s3-orders-import",
"source_type": 5,
"created_at": 1735632000,
"updated_at": 1735718400,
"status": "active",
"username": "reader",
"related_task_ids": ["task_01"],
"usage_type": [1],
"config": {
"s3": {
"endpoint": "https://s3.example.com",
"bucket_name": "orders",
"region": "us-east-1"
}
}
}
}
Response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
string |
Connector ID. |
|
string |
Connector name. |
|
integer |
Data-source type code. |
|
integer |
Creation time as a Unix timestamp. |
|
integer |
Update time as a Unix timestamp. |
|
string |
Current connector status. |
|
string |
User name in the configuration. |
|
string[] |
IDs of related data tasks. |
|
integer[] |
Saved purpose list expanded by the service from the bitmask. For example, |
|
object |
Type-specific connection configuration. For top-level keys and complete fields, see Type-specific configuration fields for creating a connector. Response fields depend on the actual data-source type. |
Error response¶
{
"code": "ErrParam",
"msg": "invalid parameter",
"data": null
}
Common HTTP errors¶
HTTP status |
Error code |
Common cause |
Recommended action |
|---|---|---|---|
|
|
The request body does not include |
Provide the connector ID. |
|
|
The service could not read the connector. |
Retry later. |
Next steps¶
To change the configuration, update the connector. If its purpose includes import and it supports file listing, list files. To browse databases and tables, view browsable connectors.