Query the connector database¶
Lists the databases that the specified connector can read.
POST $CLOUDSIGMA_API_BASE/connectors/structured/v1/source/databases
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region.
Prepare personal access token and target workspace ID that can access the target workspace. Select the records where both enabled and capabilities.list_databases are true from Query connector that supports database browsing.
Request body¶
Replace $CLOUDSIGMA_API_KEY, $WORKSPACE_ID, $CONNECTOR_ID, and $SOURCE_TYPE with actual values.
curl -X POST "$CLOUDSIGMA_API_BASE/connectors/structured/v1/source/databases" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d "{\"connector_id\": \"$CONNECTOR_ID\", \"source_type\": \"$SOURCE_TYPE\"}"
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Selected connector ID. |
|
string |
Yes |
Source type recorded for the same connector. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"databases": [
{
"name": "appdb",
"display_name": "appdb"
}
],
"endpoint_results": []
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
array of object |
Database list. |
|
string |
Database name. |
|
string |
Database name to use for display. |
|
array of JSON |
Reserve result sets. |
Error response¶
Parameter errors return HTTP 400, and internal errors may return HTTP 500/ErrServer. When Doris source fails to read, HTTP 400 / SOURCE_READ_FAILED may be returned. When the feature is turned off, a business error may be returned via HTTP 200. Error messages may contain connection diagnostics and should not be written to public logs.
{
"code": "ErrParamInvalid",
"msg": "invalid parameter",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
error message. |
|
null |
The error response is |
Common HTTP errors¶
HTTP status |
Error code |
Common cause |
Recommended action |
|---|---|---|---|
200 |
|
Business processing did not succeed; an HTTP 2xx status does not guarantee business success. |
Inspect the business code and feature flags instead of relying on the HTTP status alone. |
400 |
|
Invalid request field, workspace, or operation precondition. |
Fix the request parameters and submit again. |
500 |
|
Internal processing failed; write operations may have been partially applied. |
Retain request and trace details, and verify the current state before retrying. |