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 the X-API-Key header.

  • $WORKSPACE_ID: the target workspace ID, sent in the X-Workspace-ID header.

  • $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

id

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

code

string

OK on success.

msg

string

OK on success.

data.id

string

Connector ID.

data.name

string

Connector name.

data.source_type

integer

Data-source type code.

data.created_at

integer

Creation time as a Unix timestamp.

data.updated_at

integer

Update time as a Unix timestamp.

data.status

string

Current connector status.

data.username

string

User name in the configuration.

data.related_task_ids

string[]

IDs of related data tasks.

data.usage_type

integer[]

Saved purpose list expanded by the service from the bitmask. For example, [1] is import only, [2] is export only, and [1, 2] supports both.

data.config

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

400

ErrParam

The request body does not include id.

Provide the connector ID.

500

ErrServer

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.

Last updated on