Query the source database table¶
Paginated queries for the current identity can be used to create published source database tables.
GET $CLOUDSIGMA_API_BASE/data-share/source-databases/{source_database_id}/tables
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
First query the database list to obtain the source database ID.
Set the operation-specific values used in the request:
$SOURCE_DATABASE_ID: Source database ID, which must be a canonical string of positive integers.
Request¶
curl "$CLOUDSIGMA_API_BASE/data-share/source-databases/$SOURCE_DATABASE_ID/tables?page=1&page_size=20" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Source database ID. |
Query parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
No |
Page number. |
|
integer |
No |
Quantity per page. |
Successful response¶
On success, 200 and the publishable table of the current page are returned.
{
"code": "OK",
"msg": "OK",
"data": {
"list": [
{
"id": "101",
"name": "orders"
}
],
"total": 1,
"page": 1,
"page_size": 20
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
array |
Tables that can be published on the current page. |
|
string |
Stable identification of the OmniFabric table. |
|
string |
Table name. |
|
integer |
The total number of matching tables. |
|
integer |
Current page number. |
|
integer |
Number per page. |
In field paths, [] means each item in an array. For example, data.list[].id is the id field of each item in data.list.
Error response¶
{
"code": "ErrParamInvalid",
"msg": "请求参数无效",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The source database ID or paging parameter is invalid. |
Check path and query parameters. |
|
|
The current identity does not have permission to read the source database or table. |
Use credentials with read permissions. |
|
|
The source database or table no longer exists or cannot be matched. |
Refresh the source database and table list and try again. |
|
|
The server failed to query the source table. |
Try again later. |