Read connector table columns¶
database/table are required; schema is optional. Returns six columns fields, distinct from structured/v1 schema_snapshot and mapping-draft objects.
POST https://api.moi.matrixorigin.cn/v5/connectors/db/schema
Before you call this API¶
BASE_URL uses the product API prefix https://api.moi.matrixorigin.cn/v5. For a dedicated deployment, use its corresponding product API address.
Prepare the connector and same-environment identity. Example IDs, databases, and results are illustrative fixed values. Current source does not declare these six paths deprecated; public scope and actual deployment still require verification.
Request¶
curl --request POST \
"$BASE_URL/connectors/db/schema" \
--header "X-API-Key: $MOI_KEY" \
--header "X-Workspace-ID: $WORKSPACE_ID" \
--header "Content-Type: application/json" \
--data '{"connector_id": "source-connector", "database": "source_db", "schema": "analytics", "table": "orders"}'
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Saved connector ID usable by the current identity. |
|
string |
Yes |
Selected database name. |
|
string |
No |
Provide when database schemas need distinction. |
|
string |
Yes |
Selected table name. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"columns": [
{
"name": "record_id",
"data_type": "BIGINT",
"mapped_type": "bigint",
"is_primary_key": true,
"is_nullable": false,
"is_auto_incr": true
}
]
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
OK on success; HTTP 200 alone is insufficient. |
|
string |
Response explanation. |
|
object |
Errors and protocol selection¶
Compare metadata protocols before choosing a path. Parameter locations and response shapes are not interchangeable. See Errors and empty results.