Get structured-source read capabilities¶
Query current read and CDC capabilities for a MySQL or Doris table.
POST https://api.moi.matrixorigin.cn/v5/connectors/structured/v1/source/capabilities
Before you call this API¶
Prepare a personal access token for the target workspace with source-read or import-run privileges. Install jq and set example variables. See Common information for identity, environment, and result handoff.
Request body¶
curl -X POST "https://api.moi.matrixorigin.cn/v5/connectors/structured/v1/source/capabilities" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
--data-binary "$(jq -n --arg v0 "$CONNECTOR_ID" --arg v1 "$CONNECTOR_ID" --arg v2 "$SOURCE_DATABASE" --arg v3 "$SOURCE_TABLE" '{"connector_id":$v0,"source":{"connector_id":$v1,"source_type":"SOURCE_TYPE_DORIS","database":$v2,"table":$v3}}')"
source_type must be SOURCE_TYPE_MYSQL or SOURCE_TYPE_DORIS and match the actual connector type. MySQL and Doris capabilities depend on deployment, Worker, and source configuration; type names alone do not establish availability. disabled_reasons contains only MYSQL_CDC_ and DORIS_CDC_ reasons. Doris read reasons are in doris_read_disabled_reasons separately. CDC availability does not imply every read method is available.
Fields |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Enabled connector ID supporting import in the current workspace. |
|
object |
Yes |
Source object for the same connector. |
|
string |
Yes |
Must match the outer connector_id. |
|
string |
Yes |
Uppercase API enum permitted by this operation, not the Worker’s lowercase name. |
|
string |
Yes |
Source database. |
|
string |
Yes |
Source table. |
|
string |
No |
Provide when required by the source. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"capability_profile_hash": "profile-example",
"mysql_cdc_available": false,
"doris_cdc_available": true,
"disabled_reasons": [],
"doris_flight_sql_read_available": true,
"doris_thrift_read_available": false,
"doris_jdbc_read_available": true,
"doris_read_mode": "flight_sql",
"doris_read_disabled_reasons": null
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
OK on success; also check HTTP and business codes. |
|
string |
Response information. |
|
object |
Current source result. |
|
string |
Current capability snapshot digest, not permanent authorization or deployment version. |
|
boolean |
Whether MySQL CDC is currently available. |
|
boolean |
Whether Doris CDC is currently available. |
|
string[] |
Current CDC disabling reasons. |
|
boolean |
Whether Flight SQL reading is currently available. |
|
boolean |
Whether Thrift reading is currently available. |
|
boolean |
Whether JDBC reading is currently available. |
|
string |
Currently selected Doris read method. |
|
string[] or null |
Source-reading disabling reasons, separate from CDC reasons. |
Error response¶
Distinguish parameter, capability, authorization, and runtime-state failures using Errors and environments. Do not infer business success from HTTP 200 alone.