Query the connector table

Lists readable tables or collections in the specified database.

HTTP
POST $CLOUDSIGMA_API_BASE/connectors/structured/v1/source/objects

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 a personal access token and target workspace ID that can access the target workspace. Select the record with capabilities.list_tables as true from Query the connector that supports database browsing, and get the database name from Query source database list. Sources that support Schema level also need to obtain the Schema name from Query the Schema list of the source database.

Request body

Replace the source IDs in $CLOUDSIGMA_API_KEY, $WORKSPACE_ID, and examples with actual values.

Source containing Schema

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/connectors/structured/v1/source/objects" -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\", \"database\": \"$DATABASE\", \"schema\": \"$SCHEMA\"}"

Sources that do not contain Schema

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/connectors/structured/v1/source/objects" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d @- <<EOF
{
  "connector_id": "$CONNECTOR_ID",
  "source_type": "$SOURCE_TYPE",
  "database": "$DATABASE"
}
EOF

Source containing Schema

Parameter

Type

Required

Description

connector_id

string

Yes

Connector ID.

source_type

string

Yes

Source type.

database

string

Yes

Database name.

schema

string

No

Schema name.

Successful response

Default

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "objects": [
      {
        "database": "sales",
        "schema": "public",
        "table": "orders",
        "display_name": "orders",
        "object_kind": "table"
      }
    ],
    "endpoint_results": []
  }
}

Collection response

MongoDB returns collection but not table.

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "objects": [
      {
        "database": "sales",
        "schema": "",
        "collection": "orders",
        "display_name": "orders",
        "object_kind": "collection"
      }
    ],
    "endpoint_results": []
  }
}

Default

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.objects

array of object

List of table objects.

data.objects[].database

string

The database to which the object belongs.

data.objects[].schema

string

Schema to which the object belongs.

data.objects[].table

string

Table name.

data.objects[].display_name

string

The object name to use for display.

data.objects[].object_kind

string

Object type. This example is table.

data.endpoint_results

array of JSON

Reserve result sets.

Collection response

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.objects

array of object

List of collection objects.

data.objects[].database

string

The database to which the object belongs.

data.objects[].schema

string

Schema to which the object belongs.

data.objects[].collection

string

Collection name.

data.objects[].display_name

string

The object name to use for display.

data.objects[].object_kind

string

Object type. This example is collection.

data.endpoint_results

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.

JSON
{
  "code": "ErrParamInvalid",
  "msg": "invalid parameter",
  "data": null
}

Field

Type

Description

code

string

error code.

msg

string

error message.

data

null

The error response is null.

Common HTTP errors

HTTP status

Error code

Common cause

Recommended action

200

STRUCTURED_LOAD_FEATURE_DISABLED, STRUCTURED_LOAD_MONGODB_DISABLED

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

ErrParamInvalid, ErrWorkspaceRequired, SOURCE_READ_FAILED

Invalid request field, workspace, or operation precondition.

Fix the request parameters and submit again.

500

ErrServer

Internal processing failed; write operations may have been partially applied.

Retain request and trace details, and verify the current state before retrying.

Last updated on