Queries information about the schema of a table.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeTable

The operation that you want to perform. set the value to DescribeTable.

DbName String Yes drds_flashback

The name of the database.

DrdsInstanceId String Yes drds*********

The ID of the PolarDB-X 1.0 instance.

TableName String Yes employee_split

The name of the table.

RegionId String No cn-hangzhou

The ID of the region where the PolarDB-X 1.0 instance is created.

Response parameters

Parameter Type Example Description
Data Struct

Indicates the returned data.

List Array of ColumnInfo

Indicates the details about the table schema.

ColumnName String Id

Indicates the name of a column.

ColumnType String bigint(20)

Indicates the type of the column.

Extra String auto_increment

Extra

Index String PRI

Indicates the primary key of the table.

IsAllowNull String NO

Indicates whether the column can be empty.

IsPk String YES

Indicates whether the column is the primary key column of the table.

RequestId String B5644ABB-559A-4A1C-83F2-9E7209******

Indicates the unique ID of the request. If the request fails, provide this ID for technical support to troubleshoot the failure.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeTable
&DbName=drds_flashback
&DrdsInstanceId=drds*********
&TableName=employee_split
&<Common request parameters>

Sample success responses

XML format

<RequestId>B5644ABB-559A-4A1C-83F2-9E7209******</RequestId>
<Data>
    <List>
        <ColumnName>Id</ColumnName>
        <ColumnType>bigint(20)</ColumnType>
        <Extra>auto_increment</Extra>
        <IsAllowNull>NO</IsAllowNull>
        <IsPk>YES</IsPk>
        <Index>PRI</Index>
    </List>
</Data>
<Success>true</Success>

JSON format

{"RequestId":"B5644ABB-559A-4A1C-83F2-9E7209******","Data":{"List":[{"ColumnName":"Id","ColumnType":"bigint(20)","Extra":"auto_increment","IsAllowNull":"NO","IsPk":"YES","Index":"PRI"}]},"Success":"true"}

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.

For a list of error codes, visit the API Error Center.