Queries all tables of a specific database within a PolarDB-X 1.0 instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeTables |
The operation that you want to perform. Set the value to DescribeTables. |
DrdsInstanceId | String | Yes | drds************ |
The ID of the PolarDB-X 1.0 instance. |
DbName | String | Yes | test |
The name of the database whose tables you want to query. |
Query | String | No | drds************ |
The query condition. The value of this parameter is the ID of the PolarDB-X 1.0 instance. |
PageSize | Integer | No | 10 |
The number of tables returned on each page. |
CurrentPage | Integer | No | 1 |
The page number of the returned page. |
RegionId | String | Yes | cn-hangzhou |
The ID of the region. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PageSize | Integer | 10 |
The number of tables returned per page. |
PageNumber | Integer | 1 |
The number of returned pages. |
RequestId | String | 83AC3D7E-461C-4D87-8ACD-6CC295****** |
The ID of the request. |
Total | Integer | 1 |
The total number of returned tables. |
Success | Boolean | true |
Indicates whether the request is successful. |
List | Array of List |
The list of returned tables. |
|
Status | Integer | 0 |
Indicates whether sharding tasks are performed on the table. Valid values:
|
IsLocked | Boolean | false |
Indicates whether the table is locked. |
ShardKey | String | null |
The shard key of the table. |
IsShard | Boolean | false |
Indicates whether the table is sharded. |
Broadcast | Boolean | false |
Indicates whether the table is a replicated table. |
AllowFullTableScan | Boolean | false |
Indicates whether full table scanning is allowed. |
Table | String | test |
The name of the table. |
DbInstType | Integer | 0 |
The type of the PolarDB-X 1.0 instance. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeTables
&DrdsInstanceId=drds************
&DbName=test
&Query=drds************
&PageSize=10
&CurrentPage=1
&RegionId=cn-hangzhou
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeTablesResponse>
<PageSize>10</PageSize>
<PageNumber>1</PageNumber>
<RequestId>83AC3D7E-461C-4D87-8ACD-6CC295******</RequestId>
<Total>1</Total>
<Success>true</Success>
<List>
<Status>0</Status>
<IsLocked>false</IsLocked>
<ShardKey>null</ShardKey>
<IsShard>false</IsShard>
<Broadcast>false</Broadcast>
<AllowFullTableScan>false</AllowFullTableScan>
<Table>test</Table>
<DbInstType>0</DbInstType>
</List>
</DescribeTablesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"PageSize" : 10,
"PageNumber" : 1,
"RequestId" : "83AC3D7E-461C-4D87-8ACD-6CC295******",
"Total" : 1,
"Success" : true,
"List" : [ {
"Status" : 0,
"IsLocked" : false,
"ShardKey" : "null",
"IsShard" : false,
"Broadcast" : false,
"AllowFullTableScan" : false,
"Table" : "test",
"DbInstType" : 0
} ]
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
500 | InternalError | The request processing has failed due to some unknown error. | The error message returned because an internal error has occurred and the request failed. |
For a list of error codes, visit the API Error Center.