Queries the schema of a table.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. 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 DescribeTableDetail

The operation that you want to perform. Set the value to DescribeTableDetail.

RegionId String Yes cn-hangzhou

The ID of the region where your PolarDB-X instance is deployed.

DBInstanceName String Yes pxc-sprcym7g7w****

The name of the PolarDB-X instance.

DbName String Yes sbtest

The name of the database to which the table belongs.

TableName String Yes k_4

The name of the table.

Response parameters

Parameter Type Example Description
Message String success

The message that is returned. If the request is successful, "success" is returned. If the request fails, an error code is returned.

RequestId String FE5D94E3-3C93-3594-95D9-AAED2A980915

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

Data Object

The data that is returned.

Fields Array of Field

The information about the fields that are contained in the table.

Key String k_1

The field name of the column.

DataType String multi

The type of the data in the column.

Column String k

The alias of the column.

Extra String *

A hidden parameter.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeTableDetail
&RegionId=cn-hangzhou
&DBInstanceName=pxc-sprcym7g7w****
&DbName=sbtest
&TableName=k_4
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeTableDetailResponse>
    <Message>success</Message>
    <RequestId>FE5D94E3-3C93-3594-95D9-AAED2A980915</RequestId>
    <Success>true</Success>
    <Data>
        <Fields>
            <Key>k_1</Key>
            <DataType>multi</DataType>
            <Column>k</Column>
            <Extra>*</Extra>
        </Fields>
    </Data>
</DescribeTableDetailResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Message" : "success",
  "RequestId" : "FE5D94E3-3C93-3594-95D9-AAED2A980915",
  "Success" : true,
  "Data" : {
    "Fields" : [ {
      "Key" : "k_1",
      "DataType" : "multi",
      "Column" : "k",
      "Extra" : "*"
    } ]
  }
}

Error codes

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