Queries the fields in a table.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | ListColumns |
The operation that you want to perform. Set the value to ListColumns. |
| Tid | Long | Yes | 3*** |
The ID of the tenant. You can call the GetUserActiveTenant operation to obtain the tenant ID. |
| TableId | String | Yes | 39281**** |
The ID of the table. You can call the ListTables operation to obtain the table ID. |
| Logic | Boolean | Yes | false |
Specifies whether the database is a logical database. Valid values:
|
| RegionId | String | No | cn-hangzhou |
The ID of the region in which Data Management (DMS) is activated. For more information, see RegionID parameter. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 0AD9AC55-5873-474A-9F33-4285806A3619 |
The ID of the request. |
| ErrorCode | String | UnknownError |
The error code returned. |
| ColumnList | Array of Column |
The information about the columns returned. |
|
| Column | |||
| ColumnType | String | varchar |
The data type of the field. |
| AutoIncrement | Boolean | false |
Indicates whether the field is an auto-increment field. Valid values:
|
| ColumnId | String | 62589**** |
The ID of the field. |
| DefaultValue | String | def_value |
The default value of the field. |
| Sensitive | Boolean | false |
Indicates whether the field is a sensitive field. Valid values:
|
| ColumnName | String | name |
The name of the field. |
| SecurityLevel | String | INNER |
The security level of the field. Valid values:
Note For more information, see Adjust the sensitivity level of one or more fields.
|
| Description | String | test |
The description of the field. |
| DataPrecision | Integer | 0 |
The number of valid digits for the field. |
| DataScale | Integer | 0 |
The number of decimal places for the field. |
| FunctionType | String | DEFAULT |
The type of the masking algorithm that is used for the field. Valid values:
|
| Nullable | Boolean | false |
Indicates whether the field can be empty. Valid values:
|
| DataLength | Long | 4 |
The length of the field. |
| ErrorMessage | String | UnknownError |
The error message returned. |
| Success | Boolean | true |
Indicates whether the request was successful. Valid values:
|
Examples
Sample request
http(s)://dms-enterprise.aliyuncs.com/?Action=ListColumns
&Tid=3***
&TableId=39281****
&Logic=false
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListColumnsResponse>
<RequestId>0AD9AC55-5873-474A-9F33-4285806A3619</RequestId>
<ColumnList>
<ColumnId>62589****</ColumnId>
<ColumnName>name</ColumnName>
<Description/>
<ColumnType>varchar(4)</ColumnType>
<AutoIncrement>false</AutoIncrement>
<SecurityLevel>INNER</SecurityLevel>
<DataLength>4</DataLength>
<Sensitive>false</Sensitive>
<Nullable>false</Nullable>
</ColumnList>
<Success>true</Success>
</ListColumnsResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "0AD9AC55-5873-474A-9F33-4285806A3619",
"ColumnList" : [ {
"ColumnId" : "62589****",
"ColumnName" : "name",
"Description" : "",
"ColumnType" : "varchar(4)",
"AutoIncrement" : false,
"SecurityLevel" : "INNER",
"DataLength" : 4,
"Sensitive" : false,
"Nullable" : false
} ],
"Success" : true
}
Error codes
For a list of error codes, visit the API Error Center.